I have some Object with a lot of properties. My Angular2 app's landing page lists minimized versions of each of these objects. When I click on one of the list items, I route my app to /object:id, id being the id of the object, and the "full" version of the object will be shown.
The properties used in the minimized object will also be used in the full object. In my current version, I simply request a list of the properties used in the minimized object first, and when routing to the full object, I request all properties of that object.
However, I thought that it may be better practice to either somehow store the data used in the minimized display and then only request the remaining data, thus sharing the minimized data, or to request all complete data AT ONCE, and simply pass it to the full version when clicking.
I thus have a few questions related to my issue.
If I were to use one of the two ways I described above, how exactly should I transfer the data from one page to another? Should I create a Service, cache the data, and simply request it from the service afterwards?
What exactly should I really do? Is there a more efficient way of having both a minimized and full version of one same object on different pages and thus lessen the requests to the server?
Additional information: In my current database, I have one huge table containing the objects' data. All of it. (Unimportant detail: Since there are multiple object types, I have one table for each object type and am "joining" them into the huge table that I return to the client.) Is there way of both optimizing my client and server infrastructure?
Thansk!