PEAA – Part 2 – The patterns

I find the reading of pattern description to be tedious, and the whole part 2 of the book, from chapter 9 to 18, is a listing of design patterns. Therefore I will simply list them with their one sentence description.

Active Record
An Object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.

Application Controller
A centralized point for handling screen navigation and the flow of the application.

Association table mapping
Saves an association as a table with foreign keys to the tables that are linked by the association.

Class table inheritance
Represents an inheritance hierarchy of classes with one table for each class.

Client session state
Stores session state on the client.

Coarse-grained lock
Locks a set of related objects with a single lock.

Concrete table inheritance
Represents an inheritance hierarchy of classes with one table per concrete class of the hierarchy.

Data Mapper
A layer of mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself.

Data transfer object
An object that carries data between processes in order to reduce the number of method calls.

Database session state
Stores session data as committed data in the database.

Dependent mapping
Has one class perform the database mapping for a child class.

Domain model
An object model of the domain that incorporates both behaviour and data.

Embedded value
Maps an object into several fields of another object’s table.

Foreign key mapping
Maps an association between objects to a foreign key reference between tables.

Front controller
A controller that handles all requests for a web site.

Gateway
An object that encapsulates access to an external system or resource.

Identity field
Saves a database ID field in an object to maintain identity between an in-memory object and a database row.

Identity map
Ensures that each object gets loaded only once by keeping every loaded object in a map. Looks up objects using the map when referring to them.

Implicit lock
Allows framework or layer super-type code to acquire offline locks.

Inheritance mappers
A structure to organize database mappers that handle inheritance hierarchies.

Layer super-type
A type that acts as the super-type for all types in its layer.

Lazy load
An object that doesn’t contain all the data you need but knows how to get it.

Mapper
An object that sets up communication between two independent objects.

Metadata mapping
Holds details of object-relational mapping in metadata.

Model view controller
Splits user interface interaction into 3 distinct roles.

Money
Represents a monetary value.

Optimistic offline lock
Prevents conflicts between concurrent business transactions by detecting a conflict and rolling back the transaction.

Page controller
An object that handles a request for a specific page or action on a website.

Pessimistic offline lock
Prevents conflicts between concurrent business transactions by allowing only one business transaction at a time to access data.

Plugin
Links classes during configuration rather than compilation.

Query object
An object that represents a database query.

Record set
An in-memory representation of tabular data.

Registry
A well-known object that other objects can use to find  common objects and services.

Remote facade
Provides a coarse-grained facade on fine-grained objects to improve efficiency over a network.

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

Row data gateway
An object that acts as a gateway to a single record in a data source.There is one instance per row.

Separated interface
Defines an interface in a separate package from its implementation.

Serialized LOB
Saves a graph of objects by serializing them into a single large object (LOB), which it stores in a database field.

Server session state
Keeps the session state in a server system in a serialized form.

Service layer
Defines an application’s boundary with a layer of services that establishes a set of available operations and coordinates the application’s response in each operation.

Service Stub
Removes dependence upon problematic services during testing.

Single table inheritance
Represents an inheritance hierarchy of classes as a single table that has columns for all the fields of the various classes.

Special case
A subclass that provides special behaviour for particular cases.

Table data gateway
An object that acts as a gateway to a database table. One instance handles all the rows in the table.

Table module
A single instance that handles the business logic for all rows in a database table or view.

Template view
Renders information into HTML by embedding markers into an HTML page.

Transaction script
Organizes business logic by procedures where each procedure handles a single request from the presentation.

Transform view
A view that processes domain data element by element and transforms it into HTML.

Two step view
Turns domain data into HTML in two steps: first by forming some kind of logical page, then rendering the logical page into HTML.

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.

Value Object
A small simple object, like money or date range, whose equality isn’t based on identity.

This post is part of a set of posts with my personal notes about all the chapters in the book “Patterns of Enterprise Application Architecture” by Martin Fowler. I will do this as I read through the book, and take notes on the concepts I personally find more relevant.
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s