2.2 KiB
Looking across major software design methodologies (DDD, MVC, Clean Architecture, Hexagonal Architecture, Layered Architecture, Microservices, SOLID principles, etc.), here are 5 core patterns that emerge consistently:
1. Separation of Concerns
Every methodology divides systems into distinct parts with specific responsibilities. MVC splits presentation/logic/data, DDD separates domain/infrastructure/application, Clean Architecture uses concentric layers. The fundamental insight: different aspects of a problem should be isolated from each other.
2. Dependency Management & Direction
Methodologies establish rules for what can depend on what. Clean Architecture and Hexagonal Architecture enforce dependencies pointing inward toward business logic. DDD protects the domain from infrastructure concerns. The Dependency Inversion Principle (from SOLID) makes this explicit. The pattern: control the flow of dependencies to protect core logic from volatile details.
3. Abstraction at Boundaries
Where different concerns meet, methodologies introduce abstractions (interfaces, ports, contracts, facades). MVC uses controller abstractions, Hexagonal Architecture uses ports, DDD uses repositories and services. This creates flexibility and testability by decoupling implementations from contracts.
4. Single Responsibility
Each unit (class, module, service, layer) should have one reason to change. This appears in SOLID's Single Responsibility Principle, in MVC's role separation, in microservices' bounded contexts, and in DDD's aggregate boundaries. The insight: focused components are easier to understand, test, and modify.
5. Cohesion & Modularity
Related functionality clusters together while unrelated functionality stays separate. DDD groups by business capabilities (bounded contexts), microservices by business domains, Component-Based Architecture by features. High cohesion within modules, loose coupling between them—this pattern enables independent development, testing, and deployment.
The meta-pattern: All methodologies are strategies for managing complexity through organized thinking about boundaries, responsibilities, and relationships between parts of a system.