Developing Backbone.js Applications

Author:  Addy Osmani
Publisher: O'Reilly
Pages: 374
ISBN: 9781449328252
Print: 1449328253
Kindle: B00DCWOI5G
Audience: Intermediate JavaScript developers
Rating: 4
Reviewer: Ian Elliot 

Backbone.js is one of the many JavaScript libraries that you could adopt. What has it going for it and is a book a good way to find out?

It is probably a sign of immaturity that that there are so many JavaScript frameworks, but you still have to pick one unless you are going to reinvent the wheel. Backbone.js is a JavaScript library designed to make building single-page web apps easier. It was started by Jeremy Ashkenas, who also created the CoffeeScript language, but Backbone.js is pure JavaScript. It is roughly speaking an MVC approach to building apps. It also uses a Restful JSON based API and the actor model - and this is the sort of description that might put a lot of practical JavaScript programmers off. 

Banner

This book is an introduction to Backbone.js, but it isn't a beginners book. You need to be fluent in JavaScript and related technologies to get anything much from it. However, it does start off with a chapter on what MVC and Backbone.js are all about. Then it expands, in Chapter 2, on MVC as a design pattern. If you don't know the theoretical mess that MVC gets itself into when applied to web apps, this is a good introduction. 

Chapter 3 is where we first start using Backbone.js to build a simple example. The big problem is that there really is no preparation for this and no "bigger picture". You are presented with code and the main explanation of the code is in the comments. There is no real discussion of how the code is created or how to think about working with Backbone.js. Instead you are expected to get the information you need by reading the code. If you like this sort of approach then you will find this a good boo. If you prefer something that gives you an overview and explains the principles then you will be less happy.  

Chapter 4 is a more in-depth look at the example and you build a simple ToDo application. Then Chapter 5 presents a larger book library application, complete with a Restul api. On the way you also get to build the backend using Node.js and MongoDB.

The next chapter looks at Backbone.js extensions - MarionetteJS and Thorax and Chapter 7 runs through a set of common problems and their solutions.

 

developingbackbone

 

Chapter 8 introduces the idea of modules using RequireJS and Asynchronous Module Definition. Next we have another chapter on creating an example app but now using modules. Chapter 10 explains how to create a multipage app. Chapter 11 introduces the idea of boilerplate modules with Grunt. Chapter 12 explains how to use Backbone.js with jQuery Mobile to create mobile apps. 

The next three chapters are on tests and test driven app creation using three different test frameworks. First we have Jasmine, then QUnit and finally SinonJS. While test driven development is important, not everyone is committed to it and three chapters on three frameworks might seem like overkill. 

After a short round out, that's the end of the book. However, it is worth taking a look at Appendix A where a simple MVC framework is developed. This has a lot to teach and once you have read it many of the features of Backbone.js become easier to understand. I would recommend reading it after Chapter 2 and before getting too deep in.

This is a book about creating single page applications that just happens to use Backbone.js, rather then being in depth coverage of the framework. If you work at it you can get some value from the book, but it doesn't hand it to you on a plate. You need to be a good JavaScript programmer and be quite sophisticated in your outlook to like this book. 

Banner


Python Programming with Design Patterns

Author: James W. Cooper
Publisher: Addison-Wesley
Date: February 2022
Pages: 352
ISBN: 978-0137579938
Print: 0137579934
Kindle: B09D2RKQB5
Audience: Python developers
Rating: 1
Reviewer: Mike James
There was a time that design patterns were all the thing. Not so much now. But Python - does it have [ ... ]



Testing JavaScript Applications

Author: Lucas da Costa
Publisher: Manning
Date: April 2021
Pages: 512
ISBN: 978-1617297915
Print: 1617297917
Audience: JavaScript developers
Level: Intermediate
Rating: 5
Reviewer: Ian Elliot
Testing the most web's fundamental language is clearly important...


More Reviews

 

Last Updated ( Sunday, 15 February 2015 )