Understanding Software Architecture: Principles, Patterns, and the COLA Framework
This article explains the concept of software architecture, why it is essential, the responsibilities of architects, various architectural classifications, and introduces classic patterns such as layered, CQRS, hexagonal, onion, and the open‑source COLA framework with its design, extension, and specification guidelines.
1. What Is Architecture?
Architecture is an abstract description of the entities in a system and the relationships between them, providing a high‑level blueprint that guides design and implementation.
2. Why Do We Need Architecture?
Any system—whether an aircraft or a single e‑commerce feature—requires a well‑designed architecture to manage complexity, ensure maintainability, and support scalability.
3. Responsibilities of an Architect
An architect’s primary value is to simplify complexity; designs that make a system harder to understand are questionable. The goal is to create clear, understandable structures that other team members (designers, developers, operators) can easily work with.
Software Architecture
Software architecture describes abstract components that directly constitute a system and the connections between them. In implementation, these abstract components are refined into concrete classes or objects, often linked via interfaces.
Software Architecture Classification
Key categories include:
Business Architecture – top‑level design defining business domains and influencing organization structure.
Application Architecture – defines layers, interfaces, and data‑exchange protocols to keep complexity manageable.
Distributed System Architecture – addresses load balancing, service registration, messaging, caching, and CAP trade‑offs.
Data Architecture – standardizes data definitions, formats, and governance for large‑scale data platforms.
Physical Architecture – concerns hardware placement, network topology, and server types.
Operations Architecture – plans, selects, and deploys operational systems.
Typical Application Architectures
1. Layered Architecture
Layered architecture separates responsibilities by role, typically presenting presentation, application, domain, and infrastructure layers.
2. CQRS
Command Query Separation (CQS) splits operations into commands (state‑changing, no return) and queries (read‑only, return data).
Command : does not return a result but changes object state.
Query : returns a result without side effects.
3. Hexagonal Architecture
Also known as ports‑and‑adapters, hexagonal architecture separates the core business logic (the inner hexagon) from external drivers and infrastructure (the outer adapters).
4. Onion Architecture
Onion architecture builds on hexagonal ideas, adding multiple concentric layers (Application, Domain Service, Domain Model, Infrastructure) and enforcing that outer layers depend on inner ones while inner layers remain unaware of outer details.
5. Onion Architecture (continued)
It also emphasizes that business logic should be independent of technical details, enabling easy testing with mocks.
COLA Application Architecture
COLA is an open‑source framework developed by Alibaba that incorporates classic architectural ideas, adds standardized design and extensibility, and uses an archetype to solidify the architecture for rapid adoption.
COLA’s layered design improves the traditional three‑layer model by splitting the business layer into Application, Domain, and Infrastructure layers.
1) Presentation Layer
Accepts REST requests, routes them to the Application layer, and returns view models (typically DTOs).
2) Application Layer
Handles input validation, assembles context, invokes domain services, and may send notifications; it can also directly access the Infrastructure layer when needed.
3) Domain Layer
Encapsulates core business logic, exposing it through domain services and entities.
4) Infrastructure Layer
Provides tunnels for data sources (databases, search engines, file systems, SOA services), configuration, and common utilities.
Extension Design
Introduces two key concepts: Business Identity (BizCode) and Extension Point. A combination of BizCode and Extension Point uniquely identifies an extension implementation, enabling multi‑tenant and multi‑scenario customization.
Specification Design
COLA defines conventions for module structure, package layout, and naming to enforce consistency and reduce ad‑hoc decisions.
COLA Architecture Overview
COLA combines hexagonal and onion principles: it isolates core business logic from technical details, uses ports‑and‑adapters for decoupling, and enforces dependency direction from outer to inner layers.
Core of Application Architecture
The fundamental mission is to separate business logic from technical details, allowing the core to remain clear, reusable, and replaceable while technical components can evolve independently.
Feel free to discuss, ask questions, or share your thoughts.
Top Architect
Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.