Wednesday, January 21, 2015

Wrapping Up This Series

At this point, we have touched upon all the key elements to get a functioning SPA working. The final version of this application can be found at <http://jsfiddle.net/sckmkny/y0Lfo7yt/>.

A more complete deployment would also include the following elements:
  • Handling unexpected errors; notice that we had left most of the error handlers empty.  Because these errors are unexpected, one reasonable choice is to send the user to an error page with descriptive information.  The only action would be to reload the application, i.e., setting the location.href of the JavaScript window object (accessible through $window in Angular.js.
  • Fleshing out the rest of the app; e.g. Wines and the editing elements.  While this is a non-trivial amount of work, it is essentially repeating a combination of elements that were already covered.
  • Blocking the UI when waiting on a return from an asynchronous function, e.g., saving data.  One can use a module like angular-block-ui <https://github.com/McNull/angular-block-ui>.
  • Securing the Firebase API. This is fairly simple and well documented at <https://www.firebase.com/docs/security/guide/index.html>.
  • Breaking out the app into the component files (again in JSFIDDLE we were limited to a single file). 
  • On a similar note, downloading and using a specific version of the required libraries / modules, e.g., Bootstrap, Angular.js, etc.
  • Using the HTML5 Application Cache <http://www.w3schools.com/htmL/html5_app_cache.asp> to speed up the loading of the app.
A more complete example of a solution (running in production) can be found at <https://github.com/larkintuckerllc/pcwl>.  The running application can be run from <https://pcwl.firebaseapp.com>.


No comments:

Post a Comment