O'Reilly logo

SproutCore Web Application Development by Tyler Keating

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

Implementing remote data source adaptors

The data source adaptor API is fairly simple, but can be difficult to use if you aren't told that the data sources act independently of the rest of the application and only the store interacts with them. This means that our application doesn't really know what the data source is doing, which is fine because the application need only be concerned with those records that it is using and their current status.

Because each data source is unique to its remote counterpart, we can't work through every possible scenario. Instead, we'll look at writing a fairly standard JSON adaptor which you can modify to match your particular backend as needed.

To create a data source, we extend SC.DataSource and typically place ...

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