Architecture and Maintainable Software
-
A Module Can Hide a Decision That Changes
A useful module boundary lets one implementation decision change while callers continue to use a stable contract.
-
Read Views and Write Responsibilities
A system can organize reads differently from writes when the underlying records and consistency promises remain clear.
-
Dependency Direction for Shared Business Rules
A shared rule can live where different interfaces use it without requiring that rule to import a particular user interface.
-
Isolating a Dependency Behind a Narrow Interface
A component can translate an external interface to the operations its own callers require, preserving room to change providers or tests.
-
Using the Same Tests for Two Implementations
A contract test exercises behavior that each interchangeable implementation promises, under consistent inputs and assertions.
-
Placing a Validation Rule Where It Can Be Reused
A domain rule should have a clear owner. Interfaces can present feedback while multiple writers use consistent storage constraints where necessary.
-
Documenting the Meaning of a Domain Event
An event can record an actual occurrence or an intent. Give it a stable identity and a meaning appropriate to its point in the lifecycle.
-
Keeping a Public URL Independent of Storage Layout
A public address can identify a resource even as its content moves to another table, file, or service.
-
Rolling Out a Schema Change Across Versions
A schema change can be introduced in compatible steps when older and newer application versions temporarily share a database.
-
Building a Derived Index from Authoritative Records
A derived index can improve discovery or lookup. The canonical records supply its recoverable source of truth.
-
Preserving Earlier Addresses During a Route Change
When a public path changes, an appropriate redirect can preserve access from older saved links and point readers toward the preferred location.
-
Recording a Design Decision with Its Context
A design record can identify the observed problem, chosen boundary, and conditions that could justify revisiting it.
-
Extracting Shared Code After Comparing Behaviors
Two similar-looking routines can be combined when their compatible behavior and meaningful variations are understood.
-
Keeping a Public Interface Focused
A small interface makes it easier for callers to understand provided guarantees and for implementations to change behind them.
-
Choosing an Explicit Configuration Boundary
Configuration can select behavior without changing the built artifact. Define where defaults and overrides are read and which parts depend on them.
-
A Feature Setting and Its Effect on Stored Data
A feature setting may change what an interface displays, what it writes, or both. Data written in one mode should be handled under supported later modes.
-
Organizing Routes Around One Resource Identity
A resource can have list, detail, and edit routes. Keeping one identity scheme across them simplifies discovery and permission reasoning.
-
A Refactor and Its Observable Behavior
A refactor changes implementation structure while preserving the behavior its supported interface promises.
-
Checking Data Created by an Earlier Version
Existing records can contain values, optional fields, or layouts accepted under earlier contracts. A change should account for those supported cases.
-
Preserving Outputs and Events Across a Retried Workflow
A workflow that restarts may repeat internal work. Define which external state changes and notifications should appear once under the user's intent.
-
Observability Starting from One Real Workflow
A system's logs, metrics, and traces can be designed around concrete questions about results users care about.
-
Cohesion in a Small Component
A cohesive component groups behavior and data that serve one related responsibility. Its neighbors can use it through a concise contract.
-
What a Calling Contract Adds Beyond Parameter Types
Types help describe supported representations. A contract also identifies legitimate values, effects, and outcomes relevant to another component.
-
Checking Privacy Across Multiple Public Views
Lists, detail pages, search results, and downloadable data may retrieve related records through different paths. They should respect the same applicable visibility policy.
-
A Readable Failure Path Across Nested Components
A caller should receive an outcome that reflects which work completed and which next action remains possible.
-
A Versioned Artifact as a Reusable Input
A generated asset can be passed between stages as an identified artifact. Its version and contract describe what a later procedure is consuming.
-
Migrating Callers to a Changed Contract
A change in an interface may require callers to revise assumptions about input, result meaning, or discarded effects.
-
Making Maintenance Work Repeatable
A maintenance operation should identify what it owns, what counts as complete, and how it behaves when repeated after an ordinary interruption.
-
Grouping a Large Catalogue by Subject
A large catalogue can give each subject a focused directory while individual entries retain stable detail addresses and links to related concepts.
-
Reviewing a Change for Future Maintenance
A review can ask which behavior changed, which future edits become easier, and what evidence supports compatibility with existing callers.