Skip to content

Backbone and NodeJS contrived example that shows view caching, and treating Backbone views more like a controller with html templates being the views.

Notifications You must be signed in to change notification settings

jhspaybar/Backbone-NodeJS-Sample-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an example project showing Backbone with NodeJS. RequireJS pulls it all together, and I'm using Underscore templates. This is not the only way to use Backbone, but it is a way I've used it to keep a complex project organized and performant.

I prefer to think of a Backbone View more as a "controller" in the Ruby on Rails sense with my Underscore template holding the place of the view. Pay close attention to router.js in the /public/backbone/ directory. This provides an example of how to cache a view for fast re-rendering and event registering.

As a bonus, you get a whole NodeJS project that renders a JSON object that backbone can use directly in its models.

To run the project on your local machine install NodeJS, and NPM then type:

npm install

node app

and browse to localhost:3000/

About

Backbone and NodeJS contrived example that shows view caching, and treating Backbone views more like a controller with html templates being the views.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published