P of EAA https://ja.wikipedia.org/wiki/マーティン・ファウ ラー ⊡ 原題『Patterns of Enterprise Application Architecture』 ⊡ マーティン・ファウラー著 ⊡ エンタープライズアプリケーションの ための設計パターン集
Catalog of P of EAA ⊡ Domain Model ⊡ Active Record ⊡ Data Mapper ⊡ Unit of Work ⊡ Identity Map ⊡ Metadata Mapping ⊡ Foreign Key Mapping ⊡ Lazy Load ⊡ Single Table Inheritance ⊡ Repository ⊡ Model View Controller ⊡ Front Controller ⊡ Remote Facade ⊡ Service Layer ⊡ Data Transfer Object ⊡ Optimistic Offline Lock ⊡ Layer Supertype ⊡ Separated Interface ⊡ Value Object ⊡ etc...
“ Maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems.
ロストアップデートの予感…… $character1A = $characterRepository->find(1); // Executed SQL: SELECT FROM characters WHERE id = 1; $character1B = $characterRepository->find(1); // Executed SQL?: SELECT FROM characters WHERE id = 1; $character1A->gainExp(100); $character1B->gainExp(100); $em->flush(); // Executed SQL?: UPDATE characters SET exp = 100 WHERE id = 1; // Executed SQL?: UPDATE characters SET exp = 100 WHERE id = 1;
その他Doctrine2で使われているパ ターン ⊡ Domain Model ⊡ Active Record ⊡ Data Mapper ⊡ Unit of Work ⊡ Identity Map ⊡ Metadata Mapping ⊡ Foreign Key Mapping ⊡ Lazy Load ⊡ Single Table Inheritance ⊡ Repository ⊡ Model View Controller ⊡ Front Controller ⊡ Remote Facade ⊡ Service Layer ⊡ Data Transfer Object ⊡ Optimistic Offline Lock ⊡ Layer Supertype ⊡ Separated Interface ⊡ Value Object ⊡ etc...
参考文献 ⊡ Patterns of Enterprise Application Architecture ⊡ Catalog of Patterns of Enterprise Application Architecture ⊡ Data Mapper ⊡ Unit of Work ⊡ Identity Map ⊡ POJO