liveBook · Manning

Active record pattern

The Active Record pattern combines an object representing a persistent data record with operations for querying, storing, updating, and deleting that record.

How 3 Manning books explain it

Quarkus in Action

The active record pattern is a persistence pattern in which a data record object encapsulates the operations for storing, updating, deleting, and querying itself.

How it is used
Replaces stubbed reservation storage with entity-centered database access in a Quarkus service.
How deep it goes
Works through extension setup, entity definition, resource changes, transactions, and persistence verification without cataloging every Panache operation.
Examples
Uses Car method calls, a PostgreSQL-backed Reservation resource, POST/GET and psql checks, and a MongoDB Rental entity.
What you can do after
Build it from scratch with Panache entities and call their persistence and query methods from a Quarkus service.

Read how Quarkus in Action explains active record pattern →

Unit Testing Principles, Practices, and Patterns

The Active Record pattern combines a domain object's business logic with its persistence operations against a database.

How it is used
Deploys domain objects as both business-logic holders and database gateways, especially in simple or short-lived projects.
How deep it goes
Defines the pattern, diagnoses its testing costs, and demonstrates refactoring toward services, factories, and in-memory domain objects.
Examples
Uses a User class that loads itself from Database, changes email state, saves data, and sends a message.
What you can do after
Evaluate when database coupling makes a domain class overcomplicated and refactor coordination into an application service.

Read how Unit Testing Principles, Practices, and Patterns explains active record pattern →

Architecture Modernization: Socio-technical alignment of software, strategy, and structure

The active record pattern combines an object representing a domain record with the methods that persist and retrieve that record from a database.

How it is used
Uses a combined domain-and-persistence model to support rapid early delivery in a growing product.
How deep it goes
Defines the coupling and traces its maintenance and scaling consequences, but stops short of implementation detail.
Examples
Uses a Netherlands-to-Germany gigs-platform expansion to expose regional-model, integration, and team-scaling pressures.
What you can do after
Evaluate how coupling domain and persistence logic affects changeability, understandability, and scalability.

Read how Architecture Modernization: Socio-technical alignment of software, strategy, and structure explains active record pattern →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.