Specifically, I am confused about this line in the ember-data documentation:
Adapter API
An adapter is an object that receives requests from a store and translates them into the appropriate action to take against your persistence layer. The persistence layer is usually an HTTP API, but may be anything, such as the browser’s local storage.
So when I create a model such as:
App.store = DS.Store.create({ ... });
App.ModelOne = DS.Model.extend({...});
is ModelOne stored in App.store or the persistent layer?
What exactly happens when I declare App.store?
*Please note I am somewhat confused about how RESTful api’s work in general. Though the web at large provides a good explanation of why it’s needed and in general what it does, I have yet to find a source that really explains how it works
The Adapter API the documentation is referencing is the
DS.Adaptertype object that ember-data plugs into to interface with your data store. This store could be local browser storage, a RESTful interface, or any other type of data store. The adapter needs to implement a number of required methods, such asfind(),findMany(),findAll(),createRecord(),deleteRecord(), etc, in order to communicate with your data store through a standardized interface. Ember-data can then interface with your data store through the required methods your adapter implements.The DS.RESTAdapter is an implementation of this interface for RESTful systems that is included in ember-data. You can use that as a reference for developing your own adapter if the RESTful one is inadequate.