mongodb - Meteor Data Model in Mongo -
i'm evaluating server side frameworks , i'll glad hear think following problem meteor:
i have working system built mongodb, nodejs , angular.
i've design data models in mongo according needs of system , common sense. example, system based around concept of project contain several components have proejcts
collection , inside documents looks like
{ _id: objectid('123'), name: "project a", components: [ { comptype: "type-a" }, { comptype: "type-b" } ] }
now i'm evaluating meteor server side framework , after playing while, reading documentation , looking @ examples see in simple todos example instead of modeling data list contain todos in it modeled 2 separate collections.
i understand done purpose of allowing ddp sync data required specific client feels wrong take projects
collection , split sake of helping ddp, because means i'm modeling database according front-end needs , not server needs.
am wrong feeling? happen if i'll model todos app 1 collections lists
, update when new item added list , not update specific item?
afaik ddp can synchronize sub-documents , changes individual keys. todos app used 2 distinct collections other reasons besides optimizing ddp. if want understand how ddp works read more , watch websocket traffic in inspector. shouldn't take long compare 2 approaches modeling todos.
Comments
Post a Comment