Skip to content

ViewModels #114

Closed
Closed

Description

@ritch

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.

Activity

  1. bajtos commented on Jan 2, 2014

    @bajtos
    Member

    👍

  2. seanbrookes commented on Jan 2, 2014

    @seanbrookes

    Sounds like a good idea but I would suggest a slightly different name to avoid confusion with front-end views. Maybe DataViewModel or something.

  3. bajtos commented on Jan 2, 2014

    @bajtos
    Member

    Maybe DataViewModel or something.

    How about ClientModels, MobileModels, FrontModels?

  4. added this to the milestone on Feb 28, 2014
  5. self-assigned this
    on Feb 28, 2014
  6. modified the milestone: #Rel lb 2.0.0 on Sep 30, 2014
  7. violet-day commented on Feb 10, 2015

    @violet-day

    Great!

  8. seanbrookes commented on Feb 10, 2015

    @seanbrookes

    I like ViewModel, ViewDataModel

    On Tue, Feb 10, 2015 at 5:55 AM, Nemo notifications@github.com wrote:

    Great!

    —
    Reply to this email directly or view it on GitHub
    #114 (comment).

    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*
    ._

  9. dregre commented on Nov 29, 2015

    @dregre

    +1

  10. stale commented on Aug 23, 2017

    @stale

    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.

  11. stale commented on Sep 6, 2017

    @stale

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions