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

Large scale apps using tools in backbone.marionette

Large scale apps using tools in backbone.marionette

Jakob Dam Jensen

November 13, 2013
Tweet

Other Decks in Programming

Transcript

  1. • Jakob Dam Jensen • Web since 97 - JS

    was frightening • ASP, Servlets, PHP indtil 2007 • Since then a lot of mobile dev • But I’ve played with most client-side libs Who am I?
  2. Backbone is great • Is small • Provides structure •

    Simple and elegant • I can fix bugs in it if I need to
  3. Backbone can be a bitch • Because large scale apps

    are difficult to maintain • Can become a tightly coupled mess • Not Backbones fault • Software-engineering is hard
  4. Backbone Pain Points • Routing • Internal communication (App events)

    • It being small means that we’re on our own • Collection views etc. • View cleanup • No controllers.. really
  5. =)

  6. Marionette to the rescue • Different view types + regions

    • App architecture and infrastructure • Message bus • Controllers
  7. Blink Dashboard Members Calendar Account management List Show New List

    Edit Show New List Edit Show New List Edit Show New Edit Index Index Index Index
  8. Blink (App) Dashboard Members Calendar Account management List Show New

    List Edit Show New List Edit Show New List Edit Show New Edit Index Index Index Index
  9. Message bus: Commands • Can set command handler • App.commands.setHandler

    name, function • Can execute commands • App.execute ‘name’, [function_options]
  10. Message bus: Req Res • Can set request handlers •

    App.reqres.setHandler ‘name’, function • Can request objects • App.request ‘name’, [options]
  11. Message bus: vent • Can observe vent event • App.vent.on

    ‘name’, callbackFunction • Can trigger vent event • App.vent.trigger ‘name’, [options]
  12. Blink (App) Dashboard Members Calendar Account management List Show New

    List Edit Show New List Edit Show New List Edit Show New Edit Index Index Index Index
  13. • Main app in module acts
 as facade • Commands

    set here • Routing set here Modules encapsulates responsibilities Calendar New List Edit Show Index
  14. Blink (App) Dashboard Members Calendar Account management List Show New

    List Edit Show New List Edit Show New List Edit Show New Edit Index Index Index Index