Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (24 sloc) 1.88 KB

Preface

What we've done so far - “from scratch” PHP

  • Distinguishing between logic and display code
  • Form processing
  • Tapping into a data source (books.json)
  • Harnessing external code (e.g. Form.php, helpers.php)
  • Validating input, sanitizing output

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

Approach 2: Single-page applications (SPA)

  • 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
  • Often powered with JS templating libraries like AngularJS, Vue.js, Ember.js
  • 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.

If you wish to explore SPA's after this course I recommend checking out the following:

  • Lumen a “light” version of Laravel can be used as your server API
  • Vue JavaScript framework for building interfaces