I'm studying the ticket app.
It dizzies at first but after a while you can easily follow and learn from it.
Most of them are FKs.
Do I have to send from server only the columns specified by the model or do I have to include (nested) each referenced entity? (No idea how the JSON would be in the latter case...)
It dizzies at first but after a while you can easily follow and learn from it.
But, IMHO, is an unrealistic scenario:
Business applications normally deals with hundreds and thousands of records not only few tens.
Nevertheless I have no clue on how server should send data to the application.
Lets look at the fields of ticket model:
Code:
fields: [
'status',
{ name: 'projectId', reference: 'Project' },
{ name: 'creatorId', reference: 'User' },
{ name: 'assigneeId', reference: 'User' },
{ name: 'created', type: 'date' },
{ name: 'modified', type: 'date' },
{ name: 'modifiedById', reference: 'User' }, {
name: 'statusName',
depends: 'status',
convert: function(val, rec) {
return this.owner.getStatusName(rec.get('status'));
}
}
],
Most of them are FKs.
Do I have to send from server only the columns specified by the model or do I have to include (nested) each referenced entity? (No idea how the JSON would be in the latter case...)
If former, do I have to load ALL the referenced entities to memory?
I mean, all Projects and Users?
What if we have 1000 Users?
On the other hand:
I just crafted an application which uses a products catalog which has +/-40,000 items. If I have some reference to such entity (Product) from other models (say OrderDetail) do I have to keep the 40,000 items in memory?
Seems that the "magic" of the new data packages just wont work on large datasets
Regards.
Aucun commentaire:
Enregistrer un commentaire