Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Backbone.js Patterns and Best Practices
  • Table Of Contents Toc
  • Feedback & Rating feedback
Backbone.js Patterns and Best Practices

Backbone.js Patterns and Best Practices

By : Swarnendu De
4.3 (9)
close
close
Backbone.js Patterns and Best Practices

Backbone.js Patterns and Best Practices

4.3 (9)
By: Swarnendu De

Overview of this book

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

Chapter 3. Working with Models

JavaScript models are an essential part of client-side data management. In stateful JavaScript applications, local or remote data is stored in models and the model provides a number of functions to work with this data such as conversions, validations, data persistence, and so on. Backbone models are no different than these and provide similar functionalities such as set/get data, validate, save to or fetch from the server, delete an attribute, and sync with the server.

In this chapter, we will discuss some basic problems with models that Backbone developers usually face, and will then propose some possible solutions to them. Also, we will cover a few interesting plugins and extensions for models that will help reduce boilerplate in your code. The main points to be covered are as follows:

  • Basic usage of models: Learn the basics of Backbone models, such as important methods, properties, and data operations.

  • Validating the data: We will see how basic data validations...

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Backbone.js Patterns and Best Practices
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon