Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use Marionette vs. pure Backbone

I'm starting a fairly large Backbone project, and I'm deciding all of the key components now. I've been looking around a lot and have ran into Marionette many times. My question is, when is the right time to utilize Marionette vs using pure Backbone? My concern is that the level of complexity will rise substantially when adding an entire new library into the equation, but if the benefits of using Marionette outweigh that it may be worth looking into.

I'm not looking for opinion-based answers -- just insight into how well Backbone scales in a production environment and whether or not the weight/complexity Marionette adds is worth it.

Is there any sort of quantifiable way to determine this? At what point does Backbone fail to scale?

like image 587
streetlight Avatar asked Mar 26 '13 13:03

streetlight


1 Answers

The answer is going to be subjective because nothing requires you to use Marionette in the first place.

  1. Marionette provides a solid, proven architecture for backbone applications.
  2. If the app will have a short life (ie POC) then just use pure backbone.
  3. If you have never used backbone, read the Marionette docs and understand the problems it is intended to solve along with the design patterns implemented, then decide how well that fits your project.
  4. If you have already written many backbone apps, compare Marionette's architecture to your own and decide if it's worth adopting.

Backbone is fine, but it is your architecture that will allow your app to scale. If you are planning to build a large application you are going to have to invest time in architecture anyway.

You should also consider:

  • Chaplin
  • and Thorax
like image 137
jermel Avatar answered Oct 24 '22 18:10

jermel