ViewModels
ViewModels
We should support some form of ViewModel. A very simple implementation could depend explicitly on MongoDB. I'm struggling to come up with the exact js API, but the features would be:
- readonly
- aggregate data from multiple data sources based on model relations
- focus on read performance (and local caching config?)
- able to be created without DBAs / sql / etc
- avoid joins and slow SQL operations
- query the aggregated data
A real use case for this is illustrated in the access control example app. The client currently makes a single http request and the server calculates the account balance on demand.
With a ViewModel, the app would make the request to the ViewModel which would be backed by an aggregation (including caluclations) of all the transaction data.
:+1:
Sounds like a good idea but I would suggest a slightly different name to avoid confusion with front-end views. Maybe DataViewModel or something.
Maybe DataViewModel or something.
How about ClientModels, MobileModels, FrontModels?
Great!
I like ViewModel, ViewDataModel
On Tue, Feb 10, 2015 at 5:55 AM, Nemo [email protected] wrote:
Great!
— Reply to this email directly or view it on GitHub https://github.com/strongloop/loopback/issues/114#issuecomment-73702131.
StrongLoop http://strongloop.com/* makes it easy to develop APIs http://strongloop.com/mobile-application-development/loopback/ in Node, plus get DevOps capabilities http://strongloop.com/node-js-performance/strongops/ like monitoring, debugging and clustering*.
+1
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.