Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Old thoughts on improving model system #13

Open
twolfson opened this issue Jan 18, 2013 · 1 comment
Open

Old thoughts on improving model system #13

twolfson opened this issue Jan 18, 2013 · 1 comment

Comments

@twolfson
Copy link
Collaborator

_Latest thoughts are more along the lines of 'use backbone or something more well formed'_

Models/data should be:

Smart; Does not fetch what is already known and binds to old data seamlessly
Flexible; Stops at the proper depth
Powerful/Robust; Can return many many entries and store to proper places

First few ideas to acheive this:

Send out wanted pieces as part of Socket.io request
Return an object with keys for pieces (e.g. locations: [], users: [], users/pets: []) – by always returning an object we can start handling errors better
All requests proxy through a common function and all models have exposed id's so that requests can get the current ids from each model
This also solves a 'session expiration' error since we can globally pop up a modal for 'log back in'
@twolfson
Copy link
Collaborator Author

Even more old thoughts


I need something that:

  • When a request is made and ids are provided
    • Instead of client-side logic to make a second server request (for filling out content for id'd items)
    • Server should aggregate extra data for me
      • This needs to be smart and omniscient
      • Additionally, if all I need is an id then I won't go full recursive
    • If client has all vendors in memory, server should not make extra lookups as client will integrate seamlessly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant