rodrigomunoz/legux — pull request #2 by rodrigomunoz (2013-03-07 14:21:00+00:00)
Title: Added Backbone JS and Sinatra-backed APIs

Added Backbone JS as the MVC JS framework to be used in our web
application. This removes A LOT of work from the server and gives it to
the client who is in charge or rendering forms (using templates) and
building the requests that are going to hit the Sinatra API. I'm using the
Backbone router to handle internal routes within mini sections of the
applications: e.g. 'User Profile' and 'User Management'.

Underscore.js has also been added as a library for Backbone.

Added a new 'require' on the application to use the JSON gem in order to
serialize some of the results that are going to be handled by the client.
This is cleaner way to interact with the server.

Changed the routes on sinatra a little bit to make them all secure
(removed the '/secure/' path). We still need to secure the APIs
themselves, however they are not that bad right now since you need to be
logged in to access them.