デザインパターン
martinfowler.com Identity Field How It Works Choosing Your Key Representing the Identity Field in an Object Getting a New Key When to Use It 英語 Identity Field Saves a database ID field in an object to maintain identity between an in-memo…
martinfowler.com Implicit Lock How It Works When to Use It 英語 Implicit Lock Allows framework or layer supertype code to acquire offline locks. Offline Lockは、1行忘れただけで全部台無しになる read lockの取得が漏れると、最新のセッションデ…
martinfowler.com Pessimistic Offline Lock How It Works When to Use It 英語 Pessimistic Offline Lock Prevents conflicts between concurrent business transactions by allowing only one business transaction at a time to access data. ビジネスト…
martinfowler.com 【補】用語 Optimistic Offline Lock How It Works When to Use It 英語 【補】用語 セッションとビジネストランザクションがほぼ同義扱い Optimistic Offline Lock Prevents conflicts between concurrent busines transactions by detect…
martinfowler.com Unit of Work How It Works When to Use It Unit of Work Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems. DBへの変更をともな…
martinfowler.com Database Session State 【補】語彙 How It Works When to Use It 英語 Database Session State Stores session data as committed data in the database. 【補】語彙 レコードデータ ビジネストランザクション完了後の完全なデータ セッシ…
martinfowler.com Server Session State How It Works Java Implementation .NET implementation When to Use It 英語 Server Session State Keeps the session state on a server system in a serialized form. How It Works 最も単純な形としては、アプリ…
martinfowler.com Client Session State How It Works When to Use It 英語 Client Session State Stores session state on the client. How It Works 大なり小なり使うことになる 最小 セッションIDを保持、セッション情報本体はサーバサイドで持つ 最大 Cl…
martinfowler.com Front Controller How It Works Web handler Controller Hierarchy When to Use It Further Reading Example Front Controller A controller that handles all requests for a Web site. 複雑なWebサイトでは、リクエスト処理時に似たよう…
www.pearson.com Dependency Inversion Principle Stable Abstrations Factories Concrete Components Conclusion 英語 Dependency Inversion Principle 具象に依存するな 具象のモジュールって何 実際にコールされる関数が実装されているモジュール もちろ…
www.pearson.com Part 3 -- Design Principles SOLID原則の教えるところ 関数とデータ構造を「クラス」にまとめるやり方 クラスどうしの相互接続のあり方 「クラス」はオブジェクト指向言語を前提とはしていない 「ふるまいとデータがまとまったアレ」のこと…
www.pearson.com ISP: The Interface Segregation Principle ISP and Language ISP and Architecture Conclusion 英語 ISP: The Interface Segregation Principle SRPに則ってない User1はop1だけ利用 User2はop2だけ利用 User3はip3だけ利用 op1に変更を加…
www.pearson.com LSP: The Liskov Substitution Principle Guiding The Use of Inheritance The Square/Rectangle Problem LSP and Architecture Example LSP Violation Conclusion 英語 LSP: The Liskov Substitution Principle 置換可能性 o1: S o2: T P -…
www.pearson.com OCP: The Open-Closed Principle A Thought Experiment Directional Control Information Hiding Conclusion 英語 OCP: The Open-Closed Principle 1988, Bertrand Meyer提唱 A software artifact should be open for extension but closed …
pragprog.com Polymorphic Associations Objective: Reference Multiple Parents Antipattern: Use Dual-Purpose Foreign Key Defining a Polymorphic Association Querying a Polymorphic Association Non-Object-Oriented Example コラム: Mixing Data Wit…
martinfowler.com Money How It Works When to Use It Example: A Money Class (Java) 英語 Money Represents a monetary value. 世界のコンピュータの大部分は金絡みの計算をする 主だった言語が第一級のMoney型を提供しないのが不思議で仕方がない 言語が…
martinfowler.com Record Set How It Works Explicit Interface When to Use It 英語 Record Set An in-memory representation of tabular data. (本書執筆時点で)20年来、データベースのデータ表現は表形式の関係データ 大小さまざまなRDBMSベンダによるサ…
martinfowler.com Special Case How It Works When to Use It Further Reading Example: A Simple Null Object (C#) Special Case A subclass that provides special behavior for particular cases. null撲滅委員会 静的型付き言語では、コンパイラチェック…
martinfowler.com Value Object How It Works .NET Implementation When to Use It 名前の衝突 Value Object A small simple object, like money or a date range, whose equality isn't based on identity. 参照オブジェクトと値オブジェクトを区別すること…
martinfowler.com Layer Supertype How It Works When to Use It Example: Domain Object (Java) Layer Supertype A type that acts as the supertype for all types in its layer. レイヤーを構成する全オブジェクト共通の振る舞いを、レイヤー共通の基底ク…
メモ LaravelTokyo Eloquentに別れを告げるタイミングについて考えた / 吉田あひる ORM x Active Record x Domain Model 【補】Domain Modelではなくないか Domain LayerのことをDomain Modelって言ってるのかな Eloquentの功罪 功 高機能 罪 クエリ最適化 s…
martinfowler.com Registry How It Works When to Use It Example: A Singleton Registry (Java) Example: Thread-Safe Registry 英語 Registry A well-known object that other objects can use to find common objects and services. OOPでオブジェクトを…
martinfowler.com Gateway How It Works When to Use It Example: A Gateway to a Proprietary Messaging Service (Java) 英語 Gateway An object that encapsulates access to an external system or resource. OOシステムはオブジェクトではない外部リソー…
martinfowler.com Separated Interface How It Works When to Use It Separated Interface Defines An Interface In A Separate Package From Its Implementation. 開発を進めるにあたり、システムの部品間の結合を減らして品質を高めることがある どうやる …
martinfowler.com Mapper How It Works When to Use It Mapper An object that sets up a communication between two independent objects. 2つのサブシステムをつなぐ 疎結合に保ちたい 変更できないから 変更できるにしても、依存させたくないから Mapper …
martinfowler.com Active Record How It Works When To Use It Example: A Simple Person (Java) 英語 Active Record An object that wraps a row in a database table or view, encapulates the database access, and adds domain logic on that data. How …
martinfowler.com Table Data Gateway How It Works When To Use It Further Reading Example: Person Gateway (C#) Example: Using ADO.NET Data Sets (C#) Table Data Gateway An object that acts as a Gateway to a database table. One instance handle…
martinfowler.com Service Layer How It Works Kinds of "Business Logic" Implementation Variations To Remote or Not to Remote Identifying Services and Operations Java Implementation When To Use It Further Reading Example: Revenue Recognition …
martinfowler.com Row Data Gateway How It Works When to Use It Example: A Person Record (Java) Example: A Data Holder For a Domain Object (Java) 英語 Row Data Gateway An object that acts as a Gateway to a single record in a data source. The…
martinfowler.com Table Module How It Works When to Use It Example: Revenue Recognition (C#) A single instance that handles the business logic for all rows in a database table or view. Table Module OOのキーの一つ: データと振る舞いとをひとま…