Toggle Menu

Playing with Marionette JS Yeah.. a little late to the party...


I have been using Backbone JS for over two years at the company where I’m working.

Why? you may ask.. very simple, because the code base was developed some time ago and it works, so despite we face a lot of the common issues related to large Backbone applications it does the job.

Working around bare Backbone is something I enjoy and the strict work-flow placed by the company gave me a better understanding of how JavaScript works (or should).

Of course.. the world keeps spinning and there are amazing new things to learn around, but before diving into other JS frameworks I wanted to give Marionette JS a run.

Marionette JS lays on top of Backbone, is meant to help solve some of the common issues/boilerplate you may face when developing with Backbone.

I started to play around marionette-wires example to get a basic gulp setup.

After some time I got a basic CRUD working to load/save rows into local storage, using radio to communicate actions, behaviors to extract code and so on. Source here.

Checking Marionette and ES6 with a Backbone background was a lot of fun and an amazing experience.

Would I use Marionette in 2016?

I’m very happy of this Marionette test run, even more, when playing with it I was thinking on using it for some stuff, but that was before testing other new JS things (react/redux).

Despite I will not be using Marionette I believe it was a good thing to learn and test, was a nice way to move into ES6 without leaving a familiar neighbourhood (Backbone) and allowed me to see the gains of this switch without being overwhelmed by other concepts that come with the switch to other framework.

I can see the benefits of using Marionette on top of Backbone and if happens that I need to start a Backbone project Today I would go for Marionette without thinking twice.

What about an ongoing Backbone project?, I don’t see myself pushing it into a currently running project. If the project is big most of the stuff solved by Marionette may be already solved by custom solutions, and for small or new personal projects I may go with react/redux.

What about a big new project?, That’s the question.. and I don’t have an answer.. Ember? :)

Demo and source code

Demo

Source

Marionette JS CRUD