I am a little confused on how to go about using the RESTful server API in SilverStripe 3. I have just starting learning and the following has confused me.
All content on our site is stored in a database. Each class that is a child of the DataObject class will have its own table in our database.
Every object of such a class will correspond to a row in that table - this is our "data object", the "model" of Model-View-Controller. A page type has a data object that represents all the data for our page. Rather than inheriting directly from DataObject, it inherits from SiteTree. We generally create a "Page" data object, and subclass this for all other page types. This allows us to define behavior that is consistent across all pages in our site.
I have done this to set up pages but now I am learning about the RESTful server API and it says to create an object that extends DataObject.
Forgive my ignorance but would extending SiteTree not be the same thing?
Very confused so would appreciate some enlightenment.
$api_access = true;to you custom page classes, and see the docs for more complete instructions on setting up an API interface for your data/pages. - Benjamin Smith