Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting the most out of Backbone with Marionett...

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

Getting the most out of Backbone with Marionette.js

Avatar for Stratos Pavlakis

Stratos Pavlakis

December 20, 2013

More Decks by Stratos Pavlakis

Other Decks in Programming

Transcript

  1. Backbone.js • models with key-value binding and custom events •

    collections with a rich API of enumerable functions • views with declarative event handling • connects to your existing API over a RESTful JSON interface.
  2. View • el //div.character • ‘click .kill’: ‘kill’ • kill:

    function () {…} Model { name: Ned surname: Stark } • urlRoot: ‘/characters’ Template <span>{{name}} {{surname}}</span> <a class=‘btn kill’>kill</a> ~ part of a Collection
  3. Component B Component C Component D Sub Component A Sub

    Component A Sub Component A Component A
  4. – Me :) “It would be like a town with

    beautiful apartments and terrible street planning”
  5. –Phil Karlton “There are only two hard things in Computer

    Science: cache invalidation and naming things”
  6. Marionette.Controller A general purpose object for controlling modules, routers, views

    and implementing a mediator pattern / public API for components