Moving Beyond MVC: PAC and ECB Architectural Patterns for Modern System Design
Many engineering teams reach a point where an initially clean Model View Controller (MVC) implementation begins to lose clarity as the system grows. What once felt structured gradually turns into tightly coupled components where business logic, state management, and interface coordination overlap.
This situation is often the result of forcing a UI-centric pattern to handle the weight of complex, multi-layered system requirements.
MVC was originally designed for simple interaction flows between user interfaces and data layers. Modern systems, however, involve distributed services, asynchronous workflows, and multiple client interfaces, which place demands that the traditional MVC structure was not designed to handle.
Moving beyond MVC requires a shift toward architectural patterns that introduce stronger boundaries, clearer responsibilities, and better isolation of change.
Why MVC Struggles in Modern Applications
The most frequent failure point in MVC is the Controller layer, which gradually accumulates responsibilities beyond its intended role.
In theory, controllers act as a thin coordinator between models and views. In practical, they often become containers for validation rules, orchestration logic, and state transitions, making the system difficult to maintain.
Modern systems also face the challenge of Multiple Delivery Channels. An application might need to serve a web frontend, a mobile app, and a public API simultaneously. MVC often forces these channels to share a controller or a model in a way that creates tight coupling, making it difficult to evolve one interface without impacting the others.
Finally, the Long-lived Platform requirement demands a level of testability that MVC struggle to provide. When business rules are trapped inside controller actions, unit testing becomes nearly impossible without heavy mocking of the entire web or interface stack. This architectural friction slows down deployment cycles and increases the risk of regression.
Why Architectural Patterns Still Matter
Architectural patterns are not rigid templates or "best practices" to be followed blindly. They are proven approaches to managing recurring structural challenges in software systems. Choosing a pattern is essentially choosing how complexity will be handled across the system.
Modern system design requires a Separation of Concerns that goes deeper than just separating the "look" from the "data." It requires isolating the core business intent from the mechanisms used to trigger it.
Patterns like PAC and ECB provide the clear structural boundaries that help maintain system stability even as external requirements evolve.
Pattern 1: PAC (Presentation Abstraction Control) for Hierarchical Modularity
What It Is
Presentation–Abstraction–Control (PAC) is a hierarchical architectural pattern where the system is organized as a collection of independent agents. Unlike MVC, which typically treats the application as one large triad, PAC treats the system as a tree of agents. Each agent in the tree contains its own Presentation, Abstraction, and Control components.
- Presentation: Handles the specific interface or visible part of that particular agent.
- Abstraction: Manages the data model and logic specific to the agent's functionality.
- Control: Acts as the mediator between the internal components and handles communication with other agents in the hierarchy.
This structure excels in Independent Evolution. Because each agent is self-contained, a team can rewrite the internal logic of a "Billing Agent" without any knowledge of how the "User Profile Agent" is implemented.
Where It Fits Best
This pattern is particularly effective for complex dashboards or multi-widget interfaces where components must maintain their own local state while coordinating with a parent system.
Where It Adds Complexity
PAC introduces communication overhead between agents and requires disciplined coordination logic.
For simpler systems, this added structure may increase development effort without proportional benefit.
Real-World Scenario
Consider a global logistics dashboard. A "Map Agent" handles the geographic visualization, a "Fleet List Agent" handles the data grid, and a "Notification Agent" handles real-time alerts. Each operates as a PAC agent: they can be developed, tested, and scaled independently while the top-level "Dashboard Controller" manages the orchestration.
Key Strength
PAC supports independent evolution of components, which is critical for systems with continuous feature expansion.
Pattern 2: ECB (Entity Control Boundary) for Use Case Isolation
What It Is
The Entity–Control–Boundary (ECB) pattern, introduced by Ivar Jacobson, focuses on use-case-driven design. It provides a blueprint for separating the stable core of a system from the volatile external world. By categorizing objects based on their role in a business process, ECB ensures that changes in the UI or database do not leak into the business rules.
- Entity: Represents long-lived, persistent information, such as a "Customer" or "Invoice." These are often "dumb" objects that hold state.
- Control: Encapsulates the logic for a specific use case. This is where the actual business process lives, such as "ProcessMonthlyPayroll."
- Boundary: Represents the interface to the outside world. This could be a REST controller, a CLI, or an integration with a third-party service.
Where It Fits Best
ECB is ideal for enterprise systems with complex business rules and multiple integration points.
It is especially valuable where long-term maintainability and testability are critical.
Where It Adds Complexity
ECB requires clear discipline in defining responsibilities, which may feel excessive for small or simple applications.
Real-World Scenario
In a banking application, the logic for "TransferFunds" is a Control object. It does not care if the request came from an ATM (Boundary A) or a Mobile App (Boundary B). It merely coordinates the withdrawal and deposit between two Account Entities, ensuring that the transaction is atomic and compliant with banking rules.
Key Strength
ECB's greatest strength is its Resilience to Change. If a company decides to switch from a traditional relational database to a document store, only the Entity persistence layer changes. If they move from REST to GraphQL, only the Boundary changes. The Control logic, which represents the company's proprietary value, remains untouched and fully testable in isolation.
PAC vs ECB: Choosing the Right Pattern Based on System Needs
The choice between PAC and ECB depends on the primary source of system complexity. PAC is a Structural Partitioning pattern, whereas ECB is a Functional Layering pattern.
| Dimension | PAC (Presentation–Abstraction–Control) | ECB (Entity–Control–Boundary) |
| Primary Focus | Hierarchical decomposition into agents. | Layering by use-case and lifecycle. |
| Complexity | High overhead due to inter-agent communication. | Moderate; clear rules for object interaction. |
| Testability | Excellent for agent-level isolation. | Excellent for business logic (Control) isolation. |
| Best For | Highly interactive, multi-agent systems. | Enterprise systems with complex business rules. |
PAC is more appropriate when the system is composed of many parallel, interactive pieces that need to stay in sync. ECB is more appropriate when the goal is to protect a complex domain from the churn of changing technologies and external interfaces.
Common Misconceptions in Architectural Design
A frequent mistake is the Misapplication of MVC, where developers treat it as a top-level system architecture rather than a UI pattern. MVC is excellent for a single webpage or a simple desktop form, but it was never intended to organize an entire enterprise backend. Applying it at that scale almost always results in logic leaking into the view or the database layer.
Conversely, it is possible to introduce Unnecessary Complexity by reaching for PAC or ECB too early. For a simple CRUD (Create, Read, Update, Delete) application, the overhead of defining boundaries and controllers for every use case can slow down development without providing a clear return on investment. Architectural patterns should be introduced as a response to specific friction, not as a default starting point.
Conclusion: Designing for Change and Maintainability
Effective software architecture is a matter of finding the right boundaries for change. MVC often fails in modern systems because it provides too few boundaries, leading to a tangled web of responsibilities. PAC offers a solution for systems requiring deep modularity and independent agents, while ECB provides a framework for protecting core business logic through use-case isolation.
Key Architectural Insights
- MVC is a UI pattern, not a complete system architecture.
- PAC uses a tree of agents to achieve recursive modularity.
- ECB separates the "What" (Entity) from the "How" (Boundary) using the "Process" (Control).
Next Step: Perform an Architecture Boundary Review
Select the most complex controller in your current system and count the number of lines of code. If it exceeds 200 lines or touches more than three different entities, it is a prime candidate for refactoring. Attempt to extract the core logic into a Control object as defined by the ECB pattern to see how it impacts the testability of that feature.
