What we've done so far - “from scratch” PHP
- Distinguishing between logic and display code
- Form processing
- Tapping into a data source (
- Harnessing external code (e.g.
- Validating input
Moving forward, we'll rely on a framework to provide a lot of this functionality.
Web applications - 2 approaches
Approach 1: “page-redraw” applications
- Heavy lifting is done on the server producing a page that is displayed by the client
- May also use Ajax to transfer data from server to client, demonstrating some overlap with Approach 2.
- Examples: Wikipedia, Github, Extension School site
- Moves logic from server to client
- Heavy reliance on Ajax to get data from server to client, as needed
- The server acts as a pure data API
- Examples: Trello (to-do manager), Gmail, Facebook
Examples listed above are chosen because they mostly demonstrate the given approach; oftentimes a site may use a hybrid of both approaches. There's no one best approach— it depends on the needs of your application.
In this course, we'll build our applications using Approach 1, but know that the work we're doing has overlap with techniques you'd use when building a SPA, especially when programming the server-side API for your SPA.