Friday, September 5, 2014

Single Page Application (SPA) Must Haves

Front-end development is fun and resourceful, with all those fancy js libraries sometimes it can get out of hand. For the past year, I have been working on turning a web-based game into a single page application/game and here are some of the library I been loving.

Path.js
When it come to SPA development, its all about staying in one page. However, your app/game is more complicated than that, it has components. location.hash is your friend, it will help you 'simulate' page redirects, gives your app structure that it needs. Path is a tiny library that lets you manage your hashes with ease. 

Underscore.js
http://underscorejs.org/
Underscore saves you time parse your objects or arrays. _.pluck and _.filter are definitely my favourites out of many many useful functions. 

Handlebars.js
http://handlebarsjs.com/
Embedded javascript template system can make template more complicated than it is, when logic are pushed to the template, it can be hard to maintain. Handlebars keeps templating minimal by letting you register Helper classes outside of your template.

I am not going over Frameworks like Angular, Ember, or Backbone since it is out of the scope of this topic, however, you might be able to find traces of these library I mentioned in those frameworks!


No comments:

Post a Comment