Skip to content

Instantly share code, notes, and snippets.

@HenriqueSilverio
Last active June 12, 2024 18:02
Show Gist options
  • Save HenriqueSilverio/8cebbe4722947de4bf72017505f075f2 to your computer and use it in GitHub Desktop.
Save HenriqueSilverio/8cebbe4722947de4bf72017505f075f2 to your computer and use it in GitHub Desktop.

Grady Booch

Object-Oriented Analysis and Design With Applications, 3rd Edition

Chapter 1: Complexity - Bringing Order to Chaos - Algorithmic versus Object-Oriented Decomposition

... we cannot construct a complex system in both ways simultaneously, for they are completely orthogonal views.

... the object-oriented approach is better at helping us organize the inherent complexity of software systems.

... just as it helped us to describe the organized complexity of complex systems as diverse as computers, plants, galaxies, and large social institutions.

... object-oriented decomposition has a number of highly significant advantages over algorithmic decomposition.

  • Reuse of common mechanisms
  • More resilient to change and thus better able to evolve over time
  • Reduces the risk of building complex software systems
  • Because they are designed to evolve incrementally from smaller systems in which we already have confidence

Martin Fowler, Edward Hieatt and Rob Mee

Patterns of Enterprise Application Architecture

Chapter 11: Object-Relational Behavioral Patterns - Unit of Work

Chapter 12: Object-Relational Metadata Mapping Patterns - Repository

Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects.


Eric Evans

Domain-Driven Design - Tackling Complexity in the Heart of Software

Chapter 6: The Life Cycle of a Domain Object - Repositories


Vaughn Vernon

Implementing Domain-Driven Design

Chapter 12: Repositories

... an object that can provide the illusion of an in-memory collection of all objects of that type.

... Provide methods to add and remove objects

... Provide methods that select objects based on some criteria, and return fully instantiated objects or collections of objects whose attribute values meet the criteria.

Repository versus Data Access Object

However, an object-relational mapping tool also provides an abstraction over a persistence mechanism, but it is neither a Repository nor a DAO.

DAO facilities (perform fine-grained CRUD operations on data):

Table Module, Table Data Gateway, and Active Record are patterns typically used in a Transaction Script application. Because these patterns tend to serve as wrappers around database tables, we likely avoid using them with a domain model.

On the other hand, Repository and Data Mapper, having object affinity, are typically the patterns that would be used with a domain model.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment