O'Reilly logo

Mastering Ember.js by Mitchel Kelonye

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

Defining a store's adapter

Every store needs an adapter that sits at the network layer, where it makes the actual API request calls. This is what differentiates the two variants of our Todos application, where each of its stores defines an adapter that communicates with different remote data stores. For example, the first sample defines its adapter as follows:

App.ApplicationAdapter = DS.FixtureAdapter;

All adapters need to implement the following methods:

  • find
  • findAll
  • findQuery
  • createRecord
  • updateRecord
  • deleteRecord

These adapters enable applications to stay in sync with various data stores such as:

  • Local caches
  • A browser's local storage or indexdb
  • Remote databases through REST
  • Remote databases through RPC
  • Remote databases through WebSockets

These adapters ...

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