Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Marionette.js compared to Chaplin.js

I currently in the process of concepting a large single page web application. There will be a lot of components, so a separation of concerns is important to me. The Server is basically a REST-Server with some sugar, like sending Template Code to the client.

So I need to decide which MVC Framework I want to use client side.

I really like backbone.js so I want to have a big Framework relying on it.

What I came over is Marionette.js and Chaplin.js.

Has anybody used one or both frameworks and can say a little bit about them? Strengths, weaknesses, community behind it or are they basically the same?

This should not be a discussion about which is better, just a short feature list, so I can decide better which one to use, because I don't have the time to really get started with both.

like image 478
Johannes Klauß Avatar asked Apr 19 '13 10:04

Johannes Klauß


2 Answers

Haven't worked with Marionette but basically Chaplin is a wise decision when:

  • You need a more opinionated architecture. Useful if you need a set of rules/conventions to get up and running in a team.
  • Memory management is a concern.
  • You are maybe coming from a Ruby background and feel more comfortable using Coffeescript.

Also, if you are building a big application, in Chaplin get prepared to figure a LOT of things yourself. The documentation is there, but often you will find yourself 'alone in the dark'. Source is well commented though, which is appreciated.

like image 76
TMichel Avatar answered Oct 02 '22 22:10

TMichel


I have experience with Marionette.js about 1 year. Marionette.js is the best option when you have your own architecture, but you haven't ideas how working with views layer. I like the next scheme:

  1. Backbone as core for data layer (models, collection, rest api)
  2. Marionette.js for view layer (ItemView for one entity, CollectionView for collection of entities, CompositeView(entity + collection) and so on.
  3. Reveal.js data binding
  4. HBS as templates
  5. Your own routing and core logic

I've recommended to you brunch tool - is rich tool to compile, prepare and build your own SPA. Of course you must see Grunt + Yo + Bower its another rich tool.

like image 27
Farkhat Mikhalko Avatar answered Oct 02 '22 22:10

Farkhat Mikhalko