O'Reilly logo

Mastering TypeScript by Nathan Rozentals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data structure

In a real-world application, data for websites would be stored and retrieved from a database of some sort. To use the data within a JavaScript web page, these data structures would be serialized to JSON format. Marionette uses standard Backbone models and collections for loading and serializing data structures. For the purpose of this sample application, our data structure will look like this:

Data structure

Class diagram of ManufacturerCollection and related Backbone models

The source of our data is the ManufacturerCollection, which will have a url property to load data from our site. This ManufacturerCollection holds a collection of ManufacturerModels ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required