Basics of Backbone.js

7
“This presentation is targeted for beginners & is free of horrifying code based examples” - Avishekh Bharati

Transcript of Basics of Backbone.js

“This presentation is targeted for beginners & is free of horrifying code based examples”

- Avishekh Bharati

What is Backbone.js?

• JavaScript library that adds structure to your client-side code.• MVC for Client side.• Open sourced by company called DocumentCloud.• light weight at under 4kb (production version).

Anatomy of a Backbone.js

i. Router: for handling page transitions.ii. Views: for rendering models.iii. Models: for representing data in your applications.iv. Collections: for managing many models

Why?

• HTML and JS used for Client side development.• HTML and JS were never meant for the development of the full fledge

client side application development.• Lots of HTML, JS, jQuery call backs and Ajax led to code spaghetti.• Spaghetti code lead to maintenance nightmare. • Hard to keep data in sync between HTML UI , JS logic & database.

Where should I use Backbone.js?

• Suitable for creating front end heavy data driven applications.• For scalable embedded widgets to massive apps

Thank you !