improve server_method and finder_method
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, ruby
- Ambito
- backend-api-design, full-stack
Direzione di ricerca
Start by tracing the existing server_method and finder_method mechanisms described in the issue, including how scopes specify joins and how values are returned to the client. Done would require a decided design and implementation for requested server-method refetching and scope-level aggregators, with behavior for recomputation and JSON-serializable results.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
server_method applies to a record and returns a value computed on that record from the server, finder_method applies to a scope (all a model class) and returns a single record from that scope.
Each of these mechanisms are similar in that they execute on the server and return values to the client. The improvements are to
(a) figure out how a server_method can automatically be refetched: ...
certainly when the record is changed the server (and client is notified) the client should request a refetch.
there is also currently a ! extension to server_methods that forces a refetch, but using this is not too clean. Somehow after the record is changed locally on the server during some logical points in the UI lifecycle we should be able to request that any server_methods associated with the record be recomputed. This has to be somehow done on request however, not EVERYTIME the record changes locally. For example say a record has some column that is updated by the user typing into it. We will probably want to wait till the user changes focus before recomputing, otherwise we are going to do a roundtrip to the server on every keystroke. Perhaps model_instance.update_server_methods (alias update_server_method) which takes a list of method names to update. If method_names is empty then it does all currently active server_methods.
(b) figure out how finder_method can be extended return an aggregate value rather than a record. In otherwords its actually a new method aggregator that applies to a scope (including the default scope) and does some computation on that scope and returns a jsonizable value. Its very similar in the mechanism that finder_method uses, except where finder_method internally returns a single item collection containing the record, in this case we would return a jsonizable object tree. Probably it should use the same mechanism scopes use to specify that the computation has joins in it, so that we know when to recompute.
- Lingua principale
- JavaScript
- Stelle
- 538
- Fork
- 41
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hyperstack-org/hyperstack
-
expose_as_operations method Apertaenhancement needs doc
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
hyperstack-org/hyperstack#359 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
hyperstack-org/hyperstack#267 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
hyperstack-org/hyperstack#456 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
hyperstack-org/hyperstack#455 · 2 commenti ·
-
won't run with latest puma Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
hyperstack-org/hyperstack#454 · 1 commento ·
Tutte le issue di hyperstack-org/hyperstack
Issue simili
-
ai-observability bug team/ai-observability
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
AllTheMods/ATM-10-L#19 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
SignalK/n2k-signalk#345 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
JuliaPluto/PlutoPlotly.jl#72 ·