3 ms·
Maybe I'm just doing it wrong but when I've used Backbone I have found myself using the View to do most of the controller work, and having this just render a JS
by lucaspiller 15y ago
Maybe I'm just doing it wrong but when I've used Backbone I have found myself using the View to do most of the controller work, and having this just render a JST template. The problem is that my page is more split up than in a typical Rails MVC app.
As an example (following the game analogy), I have a column on the left displaying player stats, and the main game board on the right. The left column lets you do things such as editing a players details and inviting friends, and the game board lets you play the actual game. In Backbone I would have a View for the player column and a View for the game board, which themselves trigger other Views, as the 'controller' in Backbone doesn't really seem a logical fit for this. I'm guessing this is why they have now renamed it to Router.
I must be doing it wrong... are there any good examples of complicated apps built in Backbone?
- jashkenas 15y ago> Maybe I'm just doing it wrong [...] If it's working well for you, you're probably doing it right: http://documentcloud.github.com/backbone/#FAQ-tim-toady http://documentcloud.github.com/backbone/#FAQ-tim-toady > are there any good examples of complicated apps built in Backbone? Tons. Scroll down: http://documentcloud.github.com/backbone/#examples http://documentcloud.github.com/backbone/#examples