improve server_method and finder_method
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- javascript, ruby
調査の方向性
まず、issueで説明されている既存のserver_methodとfinder_methodの仕組みを、scopeがjoinをどのように指定するか、値がどのようにclientに返されるかも含めて追跡します。完了には、要求されたserver-methodの再フェッチとscopeレベルのaggregatorについて、再計算の挙動とJSON-serializableな結果を含む、設計の決定と実装が必要です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- JavaScript
- スター
- 538
- フォーク
- 41
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hyperstack-org/hyperstack のほかの issue
-
enhancement needs doc
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
hyperstack-org/hyperstack#359 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
hyperstack-org/hyperstack#267 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
hyperstack-org/hyperstack#456 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
hyperstack-org/hyperstack#455 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
hyperstack-org/hyperstack#454 · コメント 1 件 ·
hyperstack-org/hyperstack の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Automattic/studio#4908 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
sugarlabs/musicblocks#8847 ·