Discover a small and powerful client-side framework that can help you structure your javascript code. If you use JQuery the next step for you is to use Backbone to create maintainable web apps.
Stop the spaghetticode with BACKBONE.JSJon MaimMinshMetaRefresh April 2012
View Slide
Super Top Friends
Data-driven
You create data modelsUser actions modify dataViews automatically update themselves
ModelCollectionViewRouterData structures
approuterfriendmodelwinnersmodelfriendscollectionfriendmodel...friendsviewlandingview
SuperTopFriends/js/app.js
SuperTopFriends/js/app.js/
SuperTopFriends/js/app.js/#friends
SuperTopFriends/js/models/winners.js
SuperTopFriends/js/models/friend.js
SuperTopFriends/js/collections/friends.js
[{"name": "Salman Khan","id": "2111891"},{"name": "Kareena Kapoor","id": "2206317"},...{"name": "Aamir Khan","id": "707513"}]https://graph.facebook.com/me/friends
SuperTopFriends/js/views/landing.js
SuperTopFriends/index.html
jonmaim.github.com/supertopfriends
jonmaim.github.com/supertopfriends/#friends
SuperTopFriends/js/views/friends.js
Super Top Friendshttp://jonmaim.github.com/supertopfriends
Why use it?
< 6KB (gzipped)No assumption about UI widgetsUse HTML & CSSData-drivenMaintenable codeLong-term fun!
Caveats
SEO (AJAX has the same problem)
Who’s using it?
Resources[ref] Backbone.JS~ Jeremy Ashkenas[ebook] Backbone Fundamentals~ Addy Osmani[videos] Basics, Interactivity,Persistence~ PeepCode