Model-View-Controller has been declared “dead” many times, usually by people who have only seen it implemented poorly.
The real purpose of MVC
MVC is not about directories or naming conventions. It is about separation of responsibilities.
- The Model represents the domain.
- The View handles presentation.
- The Controller orchestrates a use case.
Problems arise when controllers start containing business logic, or when views query repositories directly.
Thin controllers, rich domain
A controller should read like a story:
- Fetch input
- Call the domain
- Return a response
Your mini-framework enforces this naturally by keeping controllers lightweight and pushing complexity into repositories and presenters.
Why MVC still works
MVC scales surprisingly well when combined with modern concepts like dependency injection and middleware.
Conclusion
MVC is not obsolete. Bad implementations are. When applied with discipline, MVC remains one of the clearest architectural patterns available.
Comentarios (3)
Finally someone explains MVC without turning it into a framework discussion.
I see this mistake all the time: fat controllers everywhere.
I learned something new.