Hello all,
Is it possible to created a nested datasource or at least is there a general best practice for combining multiple datasources? Here is my scenario:
I have an API that exposes some data for an object, a house for instance. A house has various propeties: rooms, bathrooms, etc. For a particular module in our client application we are "searching" for a specific object using an AutoComplete. Once the specific object is view is displayed with the detailed information about the house. In addition in this specific view some additional data is needed, which currently we are combining into one large response object all at once. However it seems that this breaks one of the fundamentals of a RESTful API in that now our /Houses endpoint returns all this related data that is sometimes needed but not always. I have also read that even allowing for related data to be dynamically included at the request of the client information is considered "barely acceptable" which leaves the other option being to make several (4 total in my scenario) requests. Which I have no problem doing in interest of keeping our API "pure". However I would rather not have to "monitor" the completion of each datasource independently then display the form once the last of the datasources has completed. Is there a way to combine the results of my datasources? Could I simply create an observable array that keeps a reference to each datasource?
Any ideas on this topic would be greatly appreciated.