Understanding Software Architecture: Definitions, Vertical Layers, Three‑Layer, Four‑Layer, and Horizontal Designs
This article explains what software architecture means, breaks down its constituent elements such as systems, modules, components and subsystems, and then details vertical layered architectures (including three‑layer and four‑layer models), horizontal modular architectures, complexity evaluation, design principles, and cross‑platform considerations for modern mobile applications.
Architecture can be viewed both as a noun describing the structural organization of a software system and as a verb referring to the process of designing and evolving that structure.
Key structural elements include:
System : the overall application or service.
Module : a logical grouping of related functionality within the system.
Component : the smallest deployable unit, such as a message sender or receiver.
Subsystem : a collection of modules that together form a larger functional area (e.g., a WeChat architecture diagram).
When architecture is treated as a verb, various methodological approaches are applied.
Vertical Architecture (Layered Design)
Vertical architecture emphasizes separation of concerns through layers. Classic examples include the three‑layer model:
Presentation Layer : UI components and view controllers.
Business Logic Layer : core rules, data transformation, and coordination between presentation and data layers.
Data Access Layer : interaction with storage (SQLite, Core Data) and network services.
Four‑layer architectures extend this by adding a foundation or infrastructure layer for larger apps.
Benefits of layering include easier replacement of a layer’s implementation, isolated testing, and improved maintainability.
Horizontal Architecture (Modularization)
Horizontal architecture focuses on decoupling business modules to control complexity as the app and team grow. Modules are isolated so that each can be developed, compiled, and debugged independently.
Complexity can be quantified by counting module dependencies; introducing an API service layer can dramatically reduce this complexity.
Design Principles for Architecture
Three guiding principles are recommended:
Fit Principle : Choose vertical and horizontal designs that suit the current business size and type.
Simplicity Principle : Prefer the simplest solution that meets requirements.
Evolution Principle : Start with a workable architecture and iteratively refine it as the product grows.
These principles encourage using design patterns (e.g., SOLID) only when they serve the architectural goals.
Cross‑Platform and Dynamic Considerations
Two cross‑platform strategies are discussed:
UI Cross‑Platform : WebView, Weex, React Native, Flutter, etc.
C++ Cross‑Platform : Used for performance‑critical tasks like audio/video processing or encryption.
Dynamic solutions (WebView, mini‑programs, plugin architectures) trade performance for flexibility; the choice depends on business needs and team capabilities.
Summary
Architecture describes the organization of an app’s system elements.
As a verb, it encompasses vertical layered designs, horizontal modularization, and the flexible application of design patterns.
Effective architecture must adapt to business requirements and evolve over time, following the fit, simplicity, and evolution principles.
Architect
Professional architect sharing high‑quality architecture insights. Topics include high‑availability, high‑performance, high‑stability architectures, big data, machine learning, Java, system and distributed architecture, AI, and practical large‑scale architecture case studies. Open to ideas‑driven architects who enjoy sharing and learning.
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.