title: How do I set up server side end points for a backbone.js app using sinatra and codeigniter?
body: <p>I want to create single page applications using backbone.js and want to deliver these apps to my client using php and ruby.</p>
  
  <p>I like both Sinatra and codeigniter. How would I go about setting up server side endpoints for my application? Right now I am developing a cloud computing billing calculator.</p>
  
  <p>Where do I create models and collections? On the client and server side?</p>