Web Programming for Apps and Services

Schedule Notes Resources MyApps Instructions Graded Work Code examples

BTI425 Week 3 Notes

The theme for the next three weeks is to introduce you to learning and using React, a JavaScript library from Facebook, for building user interfaces. It also kicks off our introduction to designing web apps using Components:

A component is a JavaScript code container. It includes user interface declarations (markup), and JavaScript code for logic, state management, and communication. The component is responsible for an area (e.g. a rectangle) in the user interface, including rendering and interaction. A component can hold other components, and/or be embedded in a “parent” component.

This completely changes the architecture and code design of all parts of the app. Until now, we have used a page-first approach to app design, where the task to be done, and the workflow to be followed, was designed around a set of pages. Each page used JavaScript to add functionality and user interaction. The browser and the HTML document was at the center of our app-building efforts.