Chapter 11. From Backbone To Thorax
By now, the user interface of Munich Cinema has taken shape. You have used a number of patterns and plug-ins to build applications with Backbone.js. To simplify the way we manage JavaScript projects, we also saw different automations of programming tasks with Grunt and Yeoman. As a last step, let’s look at a framework on top of Backbone.js where a number of previous ideas come together.
Authored by Ryan Eastridge and Kevin Decker, Thorax.js is an open source framework on top of Backbone.js that combines Backbone with Handlebars and some additional helpers. Thorax.js was optimized for mobile application but is increasingly used for single-page web applications as an alternative to Ember or Angular. With the Thorax.js generator, you get a tool for workflow automation. Also, Thorax comes with a Layout view, a CollectionView, and advanced event management out of the box.
This chapter might be interesting for you too, if you want to learn more about the Handlebars.js templating approach and view helpers.
In overview, we tackle the following topics:
- Productivity and scalability of an application
- Using Thorax for better view rendering
- Advanced interactions to select a movie
The Role of Frameworks
The philosophy of Backbone.js is based on simplicity and flexibility. As such, Backbone provides only a set of very basic components, such as views and collections.
While these components can be customized into any direction, we often start repeating a number of ...
Get Full Stack Web Development with Backbone.js now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.