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

Chapter 7. Organizing Backbone Applications – Structure, Optimize, and Deploy

In the previous chapters of this book, we looked at the individual components of Backbone.js and learned about several good practices that help create a better application. However, Backbone itself doesn't provide any application structure or guidance on how to organize the application source code. This makes it quite difficult for beginner-level programmers to understand how to create a folder structure, add proper namespaces, load script files in the appropriate order, and follow patterns to create a robust app architecture.

Almost every Backbone.js developer, at some point of time, faces this issue. You can find many articles (check the blog links on application architecture in Appendix A, Books, Tutorials, and References) on the Web where developers have described how they tried to structure their Backbone code base. But that again makes the task difficult because you may need to choose a particular solution...