Book Image

Backbone.js Patterns and Best Practices

By : Swarnendu De
Book Image

Backbone.js Patterns and Best Practices

By: Swarnendu De

Overview of this book

Table of Contents (19 chapters)
Backbone.js Patterns and Best Practices
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Precompiling Templates on the Server Side
Index

Summary


Events in JavaScript are one of the most interesting concepts; lots of articles and books are available on this subject. We didn't try to look into all the details in this chapter, but we analyzed how using custom events and an event dispatcher in your Backbone application can provide enormous flexibility and scalability to the application architecture. We encourage you to explore JavaScript events, function scopes, and an event dispatcher or PubSub pattern if you need a more detailed idea about it.

In this chapter, we also learned about Backbone's sync() method and how we can override the sync() method to get custom data operations for public APIs or the HTML5 LocalStorage.

Also, we have looked at various components of Backbone and discussed their best practices, few plugins and extensions related to them, and some common issues. In the next chapter, we will see how we can organize Backbone applications with different design patterns and architecture.