Backbone.js Patterns and Best Practices
eBook - ePub

Backbone.js Patterns and Best Practices

Swarnendu De

Share book
174 pages
ePUB (mobile friendly)
Available on iOS & Android
eBook - ePub

Backbone.js Patterns and Best Practices

Swarnendu De

Book details
Book preview
Table of contents

About This Book

In Detail

Backbone.js is a super light framework that allows you to structure your JavaScript codes in an MV* fashion. This framework is an excellent tool when it comes to creating an organized and modular code base for web apps of any size or complexity. Although lightweight, Backbone.js results in lots of boilerplate. Learning the best practices and design patterns will help you avoid these problems and allow you to ensure that the best standards are followed.

Backbone.js Patterns and Best Practices is packed with examples that will help you work with Backbone.js components. It also gives solutions to common problems faced by developers. It gives a complete overview of plugin development, large scale application architecture, and unit testing as well.

Starting with a discussion of why reducing boilerplate in your JavaScript code is essential, Backbone.js Patterns and Best Practices explains how to enforce reusability in your code by creating plugins and mixins. You will learn about patterns and best practices for Backbone views, models, collections, routers, and events.

You will discover solutions to common problems that developers face through simple examples, and delve into the best open source plugins available to solve these problems when they arise. This book is an excellent collection of design and implementation patterns that will help you structure and develop complex Backbone.js applications easily.


This is a step-by-step guide to design patterns, best practices, and solutions to common problems for Backbone.js-based application development.

Who this book is for

This book is for JavaScript developers who work with Backbone.js and want to learn the best design patterns to develop complex web applications. Basic knowledge of Backbone.js and JavaScript is essential.

Frequently asked questions
How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Backbone.js Patterns and Best Practices an online PDF/ePUB?
Yes, you can access Backbone.js Patterns and Best Practices by Swarnendu De in PDF and/or ePUB format, as well as other popular books in Informatica & Programmazione in JavaScript. We have over one million books available in our catalogue for you to explore.



Backbone.js Patterns and Best Practices

Table of Contents

Backbone.js Patterns and Best Practices

Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: January 2014
Production Reference: 1200114
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-357-6
Cover Image by Manali Mandal ()


Swarnendu De
Marc D. Bodley
Florian Bruniaux
Philippe Charrière
Ezekiel Chentnik
Lorenzo Pisani
Acquisition Editors
Mary Jasmine Nadar
Gregory Wild
Lead Technical Editor
Ruchita Bhansali
Technical Editors
Vrinda Amberkar Bhosale
Shubhangi H. Dhamgaye
Shweta Pant
Ritika Singh
Copy Editors
Janbal Dharmaraj
Sayanee Mukherjee
Project Coordinator
Sageer Parkar
Ameesha Green
Hemangini Bari
Abhinash Sahu
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta

About the Author

Swarnendu De is the director of Innofied Solution Pvt. Ltd. (, a specialized mobile, web, and game development company. He manages technical operations and leads the JavaScript development team there. For the last seven years, he has been working with numerous JavaScript technologies including Backbone.js, Node.js, ExtJS, Sencha, and so on, and has developed more than 50 complex JavaScript-based applications thus far. He regularly writes at his personal blog, company blog, and the Tuts+ network. He has been working with Backbone.js for the last 2 years and has developed multiple, large, and complex Backbone.js-based applications using this technology.
Swarnendu lives in Kolkata—the city of joy. He loves travelling, photography, and spending time with his family. You can reach him through his website at or via Twitter at @swarnendude.


Writing such a book is quite hard, especially when you are busy managing the operations and technical team at your own startup. I would like to thank my business partner, Sandip Saha, who shared the workload so that I could spend more time completing this book. Special thanks to my senior, Saikat Sengupta, who did all the editing and proofreading for each chapter—the whole journey wouldn't have been this smooth without his help.
Writing this book would never have been possible without the help of the Backbone community who have contributed to all the technologies that I have used in this...

Table of contents

Citation styles for Backbone.js Patterns and Best Practices
APA 6 Citation
De, S. (2014). Backbone.js Patterns and Best Practices (1st ed.). Packt Publishing. Retrieved from (Original work published 2014)
Chicago Citation
De, Swarnendu. (2014) 2014. Backbone.Js Patterns and Best Practices. 1st ed. Packt Publishing.
Harvard Citation
De, S. (2014) Backbone.js Patterns and Best Practices. 1st edn. Packt Publishing. Available at: (Accessed: 14 October 2022).
MLA 7 Citation
De, Swarnendu. Backbone.Js Patterns and Best Practices. 1st ed. Packt Publishing, 2014. Web. 14 Oct. 2022.