It’s been a long time ambition of mine to write a technical book. In the second half of 2013, I finally got the opportunity to do that, publishing Beginning Backbone.js with Apress. The book is available to purchase now, in all the usual formats.
Read (or scroll, but I’d prefer you read!) to the end of this post to get an excellent 30% off the ebook price until January 23)
Who’s The Book For? Everyone
What’s in the Book?
There are a number of different sections in the book that deal with different issues.
The Introductory Section
The Nuts & Bolts Section
The next batch of three chapters bring in the main concepts that exist in Backbone: Models, Collections, Views, Routers and Events. When going through the code examples in these chapters, a node.js server is used to provide a REST API. While the depth in which node.js is explored is limited, I feel this a bonus for front-end developers. Each of these chapters iterates from the simplest possible version and then shows how additional configuration add more power.
With this knowledge, Chapter 6 goes from start to finish with a complete application example. For this I went with Twitter, as it provides an easily understandable API. This gives the opportunity to use a Models, Collections, Routers and many different views on a single page. You end up with something that looks like the picture below.
The Extending Backbone Section
From the point, the book changes tone slightly. First I take a look at the huge number of extensions that have been written by the Backbone developer community. Here’s where the naysayers should look, if they feel that Backbones lack of data-view binding is hampering their progress. There are extensions available to help you out of almost any problem that you feel Backbone has. The beauty of this is that you can easily integrate most of these plugins in your Backbone applications. And it’s just as simple to take them out.
Similar to this chapter, Chapter 10 looks at Backbone Marionette and Thorax. These are amazing additions to Backbone, and deserved their own chapter. To put both through their paces, the Twitter sample application is refactored to utilise the features they provide.
The Discipline Section
The Doing-It-Better Section
For anyone who is already using Backbone, the chapter on best practices will help them to improve on what they already know. These tips were gathered from a wide variety of sources, as well as from my own experiences. Then the book closes out with tips on making your code even more manageable by usingRequire.js to created a modular codebase.
That final chapter also shows how to use the amazing Yeoman when you need to start from scratch in your development. The Backbone generator that’s included is brilliant. And once you discover the starting point that Yeoman provides, you’ll never look back.
So, In Summary
If you like the sound of this, why not buy the book. Or how about this: I can give you 30% off the price of the ebook if you purchase the book from the Apress site using the code BCKJ14.