Backbone.js Patterns and Best Pratice

  • Swarnendu De
I scored this a 4 / 5

Recently I have been reading Backbone.js: Patterns and Best Practice, it is put out by Packt publishing and has been written by Swarnendu De.

I will give you five guesses as to the content of the book!

In my 9-5 I have been using Ember.js for most of my JavaScript needs but I have a lot of love for Backbone.js and I have to say I loved this book.

As a bit of a background I have been reading the Kindle version of this book and as a disclaimer I was contacted by Packt to see if I would be interested in reviewing it, this doesn't effect my review though (writing a review I don't personally agree with makes no sense for anyone!)

I would consider myself a beginner/intermediate Backbone.js user, I have enough experience with it to be dangerous but my Backbone.js code is nowhere near as clean as it could be and the best practices outlined in this book are going to be a massive help to me in keeping my code clean and reusable.

One standout chapter of the book was dealing with collections, I loved the discussion around filtering data, something I have seen in a lot of Backbone.js code is that collections are pretty much used because they have to be and people iterate over the entire set way too often. I think collections are way more useful than a lot of people realise and books like this will hopefully help people use them to their full potential.

I think my favourite section of the book involved the discussion around routing and subrouting, routing in Backbone.js has always been something I haven't fully understood before and I found this section super helpful.

One thing I wasn't so keen on was that testing was sold as being something that isn't that easy, I personally disagree and if you test from the start (as the author suggests you should) then it really isn't hard and I don't think people need an excuses to not test.

Overall I would recommend this book if you wanted to improve your Backbone.js-fu!