ruby on rails - What is the best way to implement a parent applications controller or namespace controller in backbone.js? -


example apps james yu's (http://www.jamesyu.org/2011/01/27/cloudedit-a-backbone-js-tutorial-by-example/) provide excellent examples of how integrate rails backbone, if want 10 controllers? or 30?

i having trouble understanding question is. building backbone.js-based client rails 3 backend. new backbone.js too, our app structure conforms link referenced:

index.html js +- app.js +- controllers   +- controller.js   +- controller1.js   ...   +- controllern.js 

where augment backbone.controller object few methods , strategies specific our app.

in general, each controller has own set of client-side routes responsible , focused on those. use minimum number of routes minimize cases have support bookmarking mean we'd have spin whole app again.

your client not have mirror server's view of world. best practice customize experience client application , compartmentalize server dependencies.

really not sure if answers question, since have no answer far...


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -