I developed a few large scale apps with Backbone.js and always looking to improve the way I’m developing these apps, there is always something new (patterns, plugins, frameworks, libraries, etc). So I picked up this book and decided to give it a try. I have teamed up with Packt Publishing to organize a giveaway of the book. Keep reading to find out how you can be one of the Lucky Winners.
The author goes into some details about Marionette views and why using frameworks like that is necessary when dealing with large scale Backbone.js project. For example CollectionView takes care of creating, adding and removing child views. I agree that sometimes Backbone.js alone is not enough and using third party libraries like Marionette or Layout manager plugin helps a lot.
The part of the book about Models describes basics of models in Backbone.js and some of their methods like fetch, destroy, validation, serializing etc. Especially author explains a lot about validation and validation plugin. I really like chapter about Relational Data model and Backbone-relational plugin, I learned myself about model relationship in Backbone and how to handle these relationships in complex apps.
Chapter on router describes basics of routers, avoiding large code in the routes. Author explains why it is better to create separate function and call it inside your router, my approach to this is a bit different but the one described here in the book works totally fine too. Great point on using regular expressions and sub routes in router – very handy. Custom events and event dispatcher that something I’ve never used in my apps, but definitely great tool for organizing your events across entire app.
Knowing how to organize your code is very important for maintenance and things like require.js, app directory structure (html, js), global objects are great just for that.
Majority of web developers believe that testing is essential, but in reality only a few of them actually do test-driven development. I’m one of those developers that don’t do testing. So I was glad to see entire chapter dedicated to unit testing.
Overall this is a great book if you want to refresh your knowledge about Backbone.js and if you want to take your code structure and best practices to the next level.
How to Enter?
All you need to do is head on over to the book page and look through the product description of the book and drop a line via the comments below this post to let me know what interests you the most about this book. It’s that simple. Winners will get an e-copy of the Book.
DeadlineThe contest will close on March 20, 2014. Winners will be contacted by email, so be sure to use your real email address when you comment!