http://paulkoegel.github.io/colognejs-talk-2012-11/
source: https://github.com/paulkoegel/colognejs-talk-2012-11
-
Irmingard: http://irmingard.herokuapp.com
code: https://github.com/paulkoegel/irmingard-backbone -
Simple Backbone Dummy App with Model-View syncing: http://backbone-dummy.herokuapp.com
code: https://github.com/paulkoegel/backbone-dummy -
BDD Javascript Testing: Jasmine
- Javascript MVC
- provides structure for your Javascript code - less jQuery spaghetti code
- cf. "Is it MVC, or what?" below
- View Synching
- update your views whenever your models' attributes change
- Data Synching (not at all implemented in Irmingard)
- offers painless synching of Backbone models to and from your server via Ajax and JSON
- active community & widely used
- mature (initial commit: Sep 30, 2010)
- good documentation & many great tutorials
- lightweight (6kB, v0.9.2)
- templating engine agnostic (HAMLc, underscore templates, handlebars, eco, jade etc.)
- highly customizable (unlike many other JS MVC solutions)
- rather barebone, lacking esp. View functionality and conventions for larger JS apps (that's why there are so many libraries built on top of it, Backbone core is intentionally being kept minimal)
- comparatively verbose to set up View behaviour
- lacks automatic Model-View bindings
-
Backbone Marionette Composite application architecture. Better view handling and unbinding. Alternative to 9elements' Chaplin but more mature.
- Backbone Geppetto
Extends Marionette adding a "scalable Controller architecture"
- Backbone Geppetto
Extends Marionette adding a "scalable Controller architecture"
-
Backbone Relational Hierarchies of Backbone Models - 'has many'-relations etc.
-
Backbone Model Binder Provides Model-View bindings. Interesting to autosync from a view to a model via input fields etc. (plain Backbone only makes the other way around really easy).
-
HAML Coffee Assets Backbone templates with HAML syntax. After '-' and '=' you'll be writing CoffeeScript instead of Ruby.
-
Osmani, Addy. Developing Backbone.js Applications (work in progress). https://github.com/addyosmani/backbone-fundamentals. Probably the best single resource on Backbone so far.
-
3-part Peepcode screencast series: https://peepcode.com/products/backbone-js Rather slow-going. You'll learn a lot more by playing around with your own project.
-
Overview of Javascript MVC frameworks Osmani, Addy. 2012-07-27. "Journey Through The JavaScript MVC Jungle". http://coding.smashingmagazine.com/2012/07/27/journey-through-the-javascript-mvc-jungle
-
Overview of Backbone Architecture Libraries Schäfer, Mathias. 2012-05-10. "Application frameworks on top of Backbone.js. A birds-eye view of the similarities of Chaplin, Marionette and Thorax/Lumbar". https://speakerdeck.com/u/molily/p/application-frameworks-on-top-of-backbonejs-talk-at-appsberlinjs Mathias is one of the main programmers of moviepilot.com, one of the largest Backbone apps out there. He's also the maintainer of Chaplin, a not yet production-ready alternative to Marionette.
In some regards, Backbone comes a lot closer to the original MVC architecture than, e.g., Rails. MVC was designed by Trygve Reenskaug in 1979 while working on Smalltalk-80:
- called it "Model-View-Controller-Editor"
- View-Controller pair required for each element on the screen; no true separation
- Controller’s role: handling user input
- observer pattern: Views and Controllers subscribe to Models
- the View is automatically updated whenever the Model changes (for all of this cf. Addy Osmani's Developing Backbone.js Applications above)
Nevertheless, Backbone's usually considered MV* - it doesn't really follow the MVC pattern but has some important MVP features as well. Cf. Backbone.js Is Not An MVC Framework.
- to Tim Schneider for the fantastic Reveal.js Railslove template.
Contrary to what I said in the talk, it's usually my sister who solves my really tough save games - not the other way around :)