View Full Version : Using ScriptTagProxy with partial and full details of the data (two different URLs)

16 Sep 2011, 11:52 PM
I have a backend with two different views to the data
- listing of objects, with limited details (small number of fields)
- object with full details (al possible fields belonging to that data object)
The data is downloaded from the server using scripttagproxy.

As an example if the objects are people in a phonebook, the list view could contain only first names and last names, whereas the full details could contain first name, last name, address, phone number, gender, image url etc. (used to display in the person's contact card for example)

I am just wondering how to implement downloading of the full details.

Should I have two different data models - in this case people and person - and use people model to retrieve the list of people (firstName lastName) and person model to retrieve the details of a specific person? (this sounds a little clumsy and wasteful approach, or am I just imagining things?)

Or should I use a single people model containing all the data definitions & fields. But how do I then define two different scriptagproxies for the model (different URLs - one for the list and one for the details), how do I reference the specific person within the list of people for the scriptagproxy and how do I retrieve the details when needed?

Or should I change the backend to send the full details in the list view?

Am I making any sense?