Grow your Backbone App without going insane

Backbone's philosophy consists in finding the balance between giving structure to your data and remaining a flexible tool. That is what makes Backbone great, but in order to grow your application you will need to lay down the law and start stacking bricks. Decoupling your application When looking at a larger program in its entirety, individual functions start to blend into the background. Such a program can be made more readable if we have a larger unit of organization. Modules divide programs into clusters of code that, by some criterion, belong together. Eloquent Javascript The Module Pattern is a great »

Backbone App - End to End: Basic design pattern

In this article we apply the Model, Collection and View logic from the previous article on Backbone.js basics to an actual useable design pattern. It's a rather simple one but versatile enough to implement a SPA that connects to the IMDB's external API. From the previous article, one thing that jumps into mind is that if we keep adding logic to the index.html file, before we get anything remotely decent going on, we will have hundreds of lines of code straight, with no organization whatsoever. Sounds like a legacy nightmare. We shall fix that. Create the folder structure »