O'Reilly logo

Appcelerator Titanium Smartphone App Development Cookbook - Second Edition by Jason Kneen

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

Integrating data using models and collections

A key part of many applications that you might create is data. For a contact app, this could be a list of contact details; for a newsreader, it could be a list of articles; and for a task app, it could be a list of tasks.

In Alloy, data can be integrated into your application using Collections and Models. If you're familiar with backbone.js, you may well have used Collections and Models already. If you haven't, note that a Model is a data object. In this case, it could be a single task item, so it could consist of a description and a status (complete or not). A collection is a list of models, in this case a list of tasks.

Because models and collections are event-driven, they respond to changes as they ...

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