A hierarchy of patterns
An overview of all 195 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
- Neural Network ( Artificial Neural Network, Neural Net )
- Generative AI ( LLM )
- Agent
- Multi-Agent System
- Blackboard
- Process Control
- Explainability ( Algorithmic transparency )
-
Probabilistic / Statistical Reasoning Represent and reason with uncertainty using probabilistic models and statistical methods.
- Bayesian Inference
- Markov Chain
- Hidden Markov Model
- Markov Decision Process
- Monte Carlo Method
- Markov Chain Monte Carlo
- Gaussian Process
- Kalman Filter
- Maximum Likelihood Estimation
- Regression Analysis
-
Search & Optimization Techniques for finding optimal or near-optimal solutions in large search spaces.
- Minimax
- Monte Carlo Tree Search
- Gradient Descent
- Simulated Annealing
- A* Search Algorithm
- Hill Climbing
- Tabu Search
- Dynamic Programming
- Linear Programming
-
Evolutionary & Nature-Inspired Computation Search methods inspired by biological or collective natural processes.
- Genetic Algorithm
- Genetic Programming
- Particle Swarm Optimization
- Ant Colony Optimization
- Evolution Strategy
-
Supervised Learning Methods that learn mappings from inputs to labeled outputs.
- Artificial Neural Network
- Decision Tree Learning
- Random Forest
- Gradient Boosting
- Support Vector Machine
- k-Nearest Neighbors
- Naive Bayes Classifier
- Linear Discriminant Analysis
-
Deep Learning Architectures Specific neural network architectures that are widely used.
- Convolutional Neural Network
- Recurrent Neural Network
- Long Short-Term Memory
- Transformer
- Generative Adversarial Network
- Diffusion Model
- Autoencoder
-
Unsupervised Learning Techniques that discover structure in data without labels.
- k-Means Clustering
- Hierarchical Clustering
- DBSCAN
- Principal Component Analysis
- t-SNE
- Self-Organizing Map
- Association Rule Learning
-
Reinforcement Learning Agent-based learning from interaction with environments guided by rewards.
-
Symbolic / Logic-Based Reasoning Rule- and logic-based techniques for explicit symbolic reasoning.
- Expert System
- Constraint Satisfaction Problem
- Fuzzy Logic
- Automated Theorem Proving
- Case-Based Reasoning
- Semantic Network
-
Graphical / Structured Probabilistic Models Models that represent dependencies between variables as graphs.
-
Presentation Patterns related to the User Interface
- Command Line Interface ( CLI )
- Graphical User Interface ( GUI, Widget, Window )
- 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