There are many ways to render html templates dynamically in a Backbone.js application and using Underscore.js is one of the simplest and best one. Full details are explained here. I have not gone into the depth of routers/models/view, but just providing a detailed explanation of this particular method. Using Backbone and Underscore : Folder Structure…Read More Render templates in backbone using underscore.js
Backbone routers are used for routing your applications URL’s when using hash tags(#). In the traditional MVC sense they don’t necessarily fit the semantics. Though a Backbone “router” is still very useful for any application/feature that needs URL routing/history capabilities. Defined routers should always contain at least one route and a function to map the…Read More What are routers in Backbone.js?
In one sentence a Collections can be referred to as an ordered set of models. As its name suggests, it is a collection of models in an orderly way. It can be used in situations such as; Model: Student, Collection: ClassStudents Model: Todo Item, Collection: Todo List Model: Animal, Collection: Zoo Typically your collection will…Read More What are Collections in Backbone.js?
What is Backbone.js? Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface. Introduction The Evoluton of Web Application has been gradual over the…Read More Backbone.js – Complete tutorial for beginners