In this chapter, we explored how JavaScript's native class system works and how the new
, this
, and prototype
keywords/properties form the basis of it. We also learned how Backbone's extend
method makes creating new subclasses much more convenient as well as how to use apply
and call
to invoke parent methods (or when providing callback functions) to preserve the desired this
method. Finally, we looked at a number of ways in which Underscore, one of Backbone's dependencies, can solve common problems. In the next chapter, we'll dive into the first of the four Backbone classes, Model
. We'll learn how to use Model to organize our data on the client side and to exchange this data to and from our remote server.
Backbone.js Essentials
By :
Backbone.js Essentials
By:
Overview of this book
<p>This book offers insight into creating and maintaining dynamic Backbone.js web applications. It delves into the the fundamentals of Backbone.js and helps you achieve mastery of the Backbone library.</p>
<p>Starting with Models and Collections, you'll learn how to simplify client-side data management and easily transmit data to and from your server. Next, you'll learn to use Views and Routers to facilitate DOM manipulation and URL control so that your visitors can navigate your entire site without ever leaving the first HTML page. Finally, you'll learn how to combine those building blocks with other tools to achieve high-performance, testable, and maintainable web applications.</p>
Table of Contents (20 chapters)
Backbone.js Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
Building a Single-Page Site Using Backbone
Object-Oriented JavaScript with Backbone Classes
Accessing Server Data with Models
Organizing Models with Collections
Adding and Modifying Elements with Views
Creating Client-side Pages with Routers
Fitting Square Pegs in Round Holes – Advanced Backbone Techniques
Scaling Up – Ensuring Performance in Complex Applications
What Was I Thinking? Documenting Backbone Code
Keeping the Bugs Out – How to Test a Backbone Application
(Not) Re-Inventing the Wheel – Utilizing Third-Party Libraries
Summary and Further Reading
Index
Customer Reviews