I would treat my node server as just a REST interface to my data. I would then handle everything else client-side: I could load templates using require.js with a template plugin like jade, do all my routing using Backbone.Router, and then access my models and collections using Backbone.sync methods (like collection.fetch()
.)
So for example, when a user accesses "mysite.com/#page/2", I could get my Backbone router to load and display whatever template would be on the page. If I happened to need a list of products to display on that page, then I could make my product
collection do a product.fetch()
. That would send a GET request to "/products" -- or whatever URL is specified in product.url
. My node server would then respond with an array of product objects that the view my collection belongs to could use in rendering itself.