勉強日記

チラ裏

デザインパターン

PoEAA ch12 Identity Field

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…

PoEAA ch16 Implicit Lock

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の取得が漏れると、最新のセッションデ…

PoEAA ch16 Pessimistic Offline 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. ビジネスト…

PoEAA ch16 Optimistic Offline Lock

martinfowler.com 【補】用語 Optimistic Offline Lock How It Works When to Use It 英語 【補】用語 セッションとビジネストランザクションがほぼ同義扱い Optimistic Offline Lock Prevents conflicts between concurrent busines transactions by detect…

PoEAA ch11 Unit of Work

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への変更をともな…

PoEAA ch17 Database Session State

martinfowler.com Database Session State 【補】語彙 How It Works When to Use It 英語 Database Session State Stores session data as committed data in the database. 【補】語彙 レコードデータ ビジネストランザクション完了後の完全なデータ セッシ…

PoEAA ch17 Server Session State

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 最も単純な形としては、アプリ…

PoEAA ch17 Client Session State

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…

PoEAA ch14 Front Controller

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サイトでは、リクエスト処理時に似たよう…

Clean Architecture Part III ch11 DIP: The Dependency Inversion Principle

www.pearson.com Dependency Inversion Principle Stable Abstrations Factories Concrete Components Conclusion 英語 Dependency Inversion Principle 具象に依存するな 具象のモジュールって何 実際にコールされる関数が実装されているモジュール もちろ…

Clean Architecture Part 3 -- Design Principles

www.pearson.com Part 3 -- Design Principles SOLID原則の教えるところ 関数とデータ構造を「クラス」にまとめるやり方 クラスどうしの相互接続のあり方 「クラス」はオブジェクト指向言語を前提とはしていない 「ふるまいとデータがまとまったアレ」のこと…

Clean Architecture Part III ch10 ISP: The Interface Segregation Principle

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に変更を加…

Clean Architecture Part III ch9 LSP: The Liskov Substitution Principle

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 -…

Clean Architecture Part III ch8 OCP: The Open-Closed Principle

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 …

SQL Antipatterns ch7 Polymorphic Associations (WIP)

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…

PoEAA ch18 Money

martinfowler.com Money How It Works When to Use It Example: A Money Class (Java) 英語 Money Represents a monetary value. 世界のコンピュータの大部分は金絡みの計算をする 主だった言語が第一級のMoney型を提供しないのが不思議で仕方がない 言語が…

PoEAA ch18 Record Set

martinfowler.com Record Set How It Works Explicit Interface When to Use It 英語 Record Set An in-memory representation of tabular data. (本書執筆時点で)20年来、データベースのデータ表現は表形式の関係データ 大小さまざまなRDBMSベンダによるサ…

PoEAA ch18 Special Case

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撲滅委員会 静的型付き言語では、コンパイラチェック…

PoEAA ch18 Value Object

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. 参照オブジェクトと値オブジェクトを区別すること…

PoEAA ch18 Layer Supertype

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. レイヤーを構成する全オブジェクト共通の振る舞いを、レイヤー共通の基底ク…

Laravel Meetup Tokyo Vol.12 参加した

メモ LaravelTokyo Eloquentに別れを告げるタイミングについて考えた / 吉田あひる ORM x Active Record x Domain Model 【補】Domain Modelではなくないか Domain LayerのことをDomain Modelって言ってるのかな Eloquentの功罪 功 高機能 罪 クエリ最適化 s…

PoEAA ch18 Registry

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でオブジェクトを…

PoEAA ch18 Gateway

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システムはオブジェクトではない外部リソー…

PoEAA ch18 Separated Interface

martinfowler.com Separated Interface How It Works When to Use It Separated Interface Defines An Interface In A Separate Package From Its Implementation. 開発を進めるにあたり、システムの部品間の結合を減らして品質を高めることがある どうやる …

PoEAA ch18 Mapper

martinfowler.com Mapper How It Works When to Use It Mapper An object that sets up a communication between two independent objects. 2つのサブシステムをつなぐ 疎結合に保ちたい 変更できないから 変更できるにしても、依存させたくないから Mapper …

PoEAA ch10 Active Record

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 …

PoEAA ch10 Table Data Gateway

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…

PoEAA ch9 Service Layer

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 …

PoEAA ch10 Row Data Gateway

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…

PoEAA ch9 Table Module

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のキーの一つ: データと振る舞いとをひとま…