poeaa ch8 Putting It All Together (1/2)
- Putting It All Together
- Starting with the Domain Layer
- Down to the Data Source Layer
- The Presentation Layer
- 英語
Putting It All Together
- これまでの総集編
- あくまで、本書提示のパターンは読者の考えの一助にすぎない。
読者の考えを置換するものではない- プロジェクトについては著者よりも読者のほうが詳しい
- 相談を持ちかけられることがあるが、5分程度の説明で特別なアドバイスを送れようはずもない
- (設計に関する)決断は、二度と変更できないわけではない
Starting with the Domain Layer
- 選択肢
- Transaction Script
- Table Module
- Domain Model
- 選び方
- Transaction Script
- Domain Model
- Table Module
- ツール(ミドルウェアとか)との兼ね合い
Down to the Data Source Layer
- ドメイン層の選択にもとづいて決める
Data Source for Transaction Script
- Row Data Gateway
- 1レコード1オブジェクト
- オブジェクトはexplicitなインタフェースをもつ
- 【補】メソッドとかが生えているということでしょう
- Table Data Gateway
- プラットフォームとの兼ね合い
- Record Setありきで動くようなツールがあるケース
- UIツール
- transactional disconnected record sets
- この場合Table Data Gateway
- Record Setありきで動くようなツールがあるケース
- Transactional Scriptを選択した場合、ふつうO/Rマッピング不要
- 並列性の問題はまずない
Data Source for Table Module
- Table Moduleを選定したということは、プラットフォームがRecord Setをサポートするツールを提供しているはず
- Table Data Gateway使え
- Record SetとTable Data Gatewayとは神の思し召しかというくらいマッチする
- 原文: made in heaven
- Record SetとTable Data Gatewayとは神の思し召しかというくらいマッチする
- Record Setが並列制御の仕組みを持っているとなおよい
- Unit of Workを兼ねてくれる
- Maintains a list of objects affected by a business transation
and coordintates the writing out of changes
and the resolution of concurrency problems.
- Maintains a list of objects affected by a business transation
- 自前で並列制御しなくてすむので、髪の毛の減少を抑えられる
- Unit of Workを兼ねてくれる
Data Source for Domain Model
- Domain ModelはDBとのコネクションが複雑になる
- Domain Modelの複雑性による分岐
The Presentation Layer
- 下層の選択とは比較的独立している
- クライアントどうする
- 以下、Webブラウザ前提
- MVC使え
- Mの話は済んでいる(Domain Layer, Data Source Layer)
- CとVをどうするか
- ツールとの兼ね合い
- Visual Studio
- Page Controller/Template Viewが一番簡単
- Java
- Visual Studio
- 自由なら?
- サイトがドキュメント指向(静的・動的ページを出し分けるようなやつ)なら
- Page Controller
- An object that handles a request for a specific page or action on a Web site.
- input controllerの一つ
- 【補】Laravelの「Controller」はこれ
- 【補】比較的シンプルなサイト、という意味か
- Page Controller
- ナビゲーションとUIが複雑
- サイトがドキュメント指向(静的・動的ページを出し分けるようなやつ)なら
- ビューの選択
- 下層との連絡
- 可能な限り同一プロセス内であることが望ましい
- はやい
- プロセス間通信やリモートプロシージャコールは遅い
- やむを得ず行うなら、遅い通信の回数を少なくする工夫をする
- ドメイン層にRemote Facadeを立てる
- 【補】coarse-grainedなインタフェースを提供するFacade
- Data Transfer Objectで、伝送するオブジェクトをまとめる
- ドメイン層にRemote Facadeを立てる
- 可能な限り同一プロセス内であることが望ましい
英語
- pundit
- An expert in a particular subject or field who is frequently called upon to give their opinions to the public.
- prod
- Stimulate or persuade (someone who is reluctant or slow) to do something. ‘they attempted to prod the central bank into cutting interest rates’ More example sentences
- panacea
- A solution or remedy for all difficulties or diseases.
- 万能薬
- fill the bill
- ぴったり要求にかなう
- look down one's nose
- 見下した態度を取る
- zealot
- A person who is fanatical and uncompromising in pursuit of their religious, political, or other ideals.
- fanatical
- Filled with excessive and single-minded zeal.
- finesse
- [mass noun] Impressive delicacy and skill.
- [with object] Bring about or deal with (something) by using great delicacy and skill.
- inexorably
- In a way that is impossible to stop or prevent.
- focal
- Relating to the centre or most important part.