A hierarchy of patterns
An overview of all 135 patterns cataloged on this site
Code structure
-
Language Features Discriminative programming language features. Most features like variables, loops and if/then statements are available in (almost) all languages. But others are specific to just one or two languages. If such feature is essential to your application, you may need to choose a language that supports it. And some features you may actually want to avoid.
- Type system features
- Syntax features
- Data & Memory features
- Function features
- Object Oriented Programming features
- Functional programming features
- Reactive programming features
- Error handling features
- Concurrency features ( Parallellism )
- Miscellaneous features
-
Classes / Interfaces Patterns for classes and interfaces
-
Principles Principles for classes and interfaces
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
-
-
Types of code The types of code that are architecturally relevant. The idea is that every line of code falls in one of these categories. In a simple project all kinds are used in the same functions, files, and modules. A medium sized project could profit from separating some of these types in separate classes or layers. A large project can seriously benefit from separating all of them.
- Business Logic ( Domain Logic )
- Application Logic ( Use cases )
- User Interface
- Presentation Logic ( View Logic )
- Data Access Logic
-
Modules Patterns within and between modules. Closely related to modules are components and packages. The term 'module' used here reflects these as well.
- Module
- Component
- Feature Flags ( Feature Toggles )
- Plugin ( Add-on, Theme, Skin )
-
Principles for modules - Reuse/Release Equivalence Principle
- Common Closure Principle
- Common Reuse Principle
- Acyclic Dependencies Principle ( Dependency hierarchy )
- Stable Dependencies Principle
- Stable Abstractions Principle
-
Systems Patterns that form the most basic structure of the system
- Layers
- Bounded Context ( Architectural boundaries )
-
Application Perspectives on how a system should be structured, based on what's perceived most important: ease-of-development, testability, or understandability
- Smart-UI
- Document-View
- Traditional Model-View-Controller ( Model-View-Updater )
- Model-View-Adapter ( Model-View-Presenter )
- Model-View-Viewmodel ( MVVM, Model-View-Binder )
- Hierarchical MVC ( Presentation-Abstraction-Control, Hierarchical model-view-controller )
- Microkernel ( Kernel )
- Software Framework
- Entity-Control-Boundary ( Entity-Boundary-Control, Boundary-Control-Entity )
- Hexagonal Architecture ( Ports and Adapters, Onion Architecture, Clean Architecture, Functional Core / Imperative Shell )
- Data-Context-Interaction
Code purpose
-
Data Patterns that focus on the data of the application
- Event Sourcing ( Block chain )
- Snapshot Sequence
- CQRS ( Command-Query Responsibility Segregation )
- Index ( Search engine, Information retrieval )
- Cache
- Transaction ( Unit of work )
- Undo
- ETL ( Extract Transform Load )
- Entity-Component-System
- Data Synchronization ( Sync )
-
Data storage How data is stored
- Repository ( Database )
- Data Warehouse ( Business Intelligence )
- Data Cube ( Timeseries, Array DBMS )
-
Data interaction Ways of reading and writing data
- ORM ( Object-Relational Mapping )
-
Data formats Standard formats of data types
- UNICODE ( UTF-8 )
- Standardized Date Format ( ISO 8601 )
- Coordinated Universal Time ( UTC )
-
Locking Handling concurrent access to data
-
Cross-cutting concerns Patterns that provide a specific function in many distinct areas of the code base
- Logging
- Error Handling
- Data Validation
- Internationalization ( Translation, Localization, i18n, l10n )
- Coding Conventions ( Linting )
- Ubiquitous Language
-
Control flow Patterns that focus on the way the code is executed
- Pipe and Filter
- Parallel Programming
- Finite State Machine
- Interpreter
- Publish-Subscribe ( Event bus, Event loop )
- Message Queue ( Event bus, Event loop )
- Game Loop
- Lifecycle Hooks
-
Problem solving Patterns designed to solve user problems
- Algorithm
- Heuristic
- Search
- Inference Engine
- Planning
- Decision Tree Learning
- Neural Network ( Artificial Neural Network, Neural Net )
- Generative AI ( LLM )
- Agent
- Multi-Agent System
- Blackboard
- Process Control
- Explainability ( Algorithmic transparency )
-
Presentation Patterns related to the User Interface
- Command Line Interface ( CLI )
- Navigation Graph ( UI Flow, User Flow, UI Storyboard, Navigation Flow )
- Menu Navigation ( Toolbar )
- Template Engine ( Template Processor )
-
User Interface Patterns related to User Interface (UI) design
- Color
- Typeface ( Font )
- Icon Set
- Page layout
- Accessibility
-
User Experience Patterns related to User Experience (UX) design
-
Animation Patterns related to animated computer graphics
- Graphics Pipeline
- Double Buffering ( VSYNC )
-
Access control Control who has access to the system and to what parts of the system
-
Authentication Determine that the user is who they claim to be
- Login
- Single Sign-on ( SSO )
- Federated Identity
-
Authorization Describe who has access to what
- Access Control List ( ACL )
- Role-based Access Control ( RBAC )
-
-
Change Management of code changes
- Version Control ( Revision Control, Source Control )
- Software Versioning
-
Distributed computing Patterns that distribute the application over multiple servers
- Monolith ( Single tier )
- Client-Server
- N-Tier ( Multitier )
- Broker ( Service Oriented Architecture, Microservices, API, Hub-and-spoke, Event-bus )
- Repository ( Database )
- Master-Slave
- Peer to Peer
- Parallel Programming
- Load Balancing
- Serverless
- Space-Based
- Data Replication
-
App Environment Patterns that are not part of the application in the narrow sense, but are nevertheless part of its broader environment
- Containerization ( Docker, Kubernetes )
- Deployment ( CI/CD )
- User Manual
- Software license
-
Testing Patterns that ensure that some aspect of the application meets a criterium
- Functional tests
- Frontend tests
- Security tests
- Performance tests
- Compatibility tests ( Cross browser testing )
-
Monitoring Following aspects of the activity of the system by an external service