Architecture – The Lost Years by Robert C. Martin
What Are "The Lost Years"?
In his iconic talk "Architecture: The Lost Years", Robert C. Martin (Uncle Bob) argues that software architecture has lost its way. He claims that developers have focused too heavily on frameworks and tools while forgetting the fundamental principles that make systems flexible, testable, and sustainable.
The Core Message
Uncle Bob's main point is simple yet profound: architecture is about behavior, not frameworks. The purpose of architecture is not to please a particular technology stack. It's to shape the software so that it supports the business use cases with minimal friction.
“Frameworks are tools, not architectures. They should plug into your architecture, not the other way around.” — Robert C. Martin
Signs of Lost Architecture
- Over-dependence on frameworks like Spring, Angular, or Rails
- UI-driven or database-driven designs
- Business rules mixed with infrastructure concerns
- Difficulty in testing core logic without UI or database
Uncle Bob critiques the trend of "framework-first" development, where the architecture is dictated by tools instead of the business needs.
What Should Architecture Do?
- Decouple business logic from delivery mechanisms
- Isolate the core use cases from infrastructure (UI, DB, frameworks)
- Enable testing of business logic without external dependencies
- Adapt easily to technology changes
In short, good architecture is about use cases, not databases; about business logic, not tools.
Example: Clean Architecture
Uncle Bob proposes the Clean Architecture as a remedy. It uses concentric circles:
- Entities: Enterprise-wide business rules
- Use Cases: Application-specific business rules
- Interface Adapters: Controllers, Presenters, Gateways
- Frameworks & Drivers: UI, DB, Devices, Web
The rule: dependencies point inward. The inner layers know nothing about the outer layers.
Code Example: Business Logic Without Frameworks
// Core Use Case (Independent of UI/DB)
public class TransferService {
public void Transfer(Account from, Account to, decimal amount) {
if (from.Balance < amount)
throw new InvalidOperationException("Insufficient funds");
from.Withdraw(amount);
to.Deposit(amount);
}
}
This class is pure business logic. It has no dependencies on ASP.NET, SQL Server, or any framework—exactly what Uncle Bob recommends.
Conclusion
The "lost years" refer to a time when developers let frameworks dictate architecture. Robert C. Martin urges us to reclaim control—build systems around the use cases, not the tools. A well-architected system should be independent of frameworks, easy to test, and resilient to change.
Remember: Frameworks come and go. Your business logic should endure.
0 Comments