So far i have been having a great experience with Ember but one thing i feel i am not doing right is the data access. My application is almost a pure data reader and when it does need to submit data it is all submitted via the url as it is more a command like rest but with no data. My issue is currently 2 fold.
- My source data is in an XML format
- A lot of the time i don’t want to cache my data or i need to refresh it frequently
My datasource is a “Plex Media Server” and the majority of the api works like this
- /Metadata/5 (displays info for item 5)
- /Metadata/5/children (displays info for item 5 and contains a property that has an array of child instances. Each of these child instance has the same content as /Metadata/id where the id is the id on the child )
- /Metadata/x/children (where x is the child if from above) (displays the info for the child and its children.)
There are other url’s but i have not investigated them yet. most of the data is accessed based on the 2 url formats above.
Am i better off just loading my data via my controllers like i currently am or is there some better way i should be loading this data? I am not sure if ember-data is the best fit due to the strange way the url works as well as the data been returned is quite structured and changes based on the type of item the metadata is for(i think it changes i still need to do some tests on this)