Following up on his previous article talking about the MVC design pattern (and the idea of "MVC"), Anthony Ferrara has posted some alternatives to MVC for your consideration. These other options are mostly variants of the typical MVC structure and could be considered "siblings".
Last week, I wrote A Beginner's Guide To MVC For The Web. In it, I described some of the problems with both the MVC pattern and the conceptual "MVC" that frameworks use. But what I didn't do is describe better ways. I didn't describe any of the alternatives. So let's do that. Let's talk about some of the alternatives to MVC...
He starts by restating some of the major issues with the typical MVC implementation (three of them). From there, he covers each of the alternatives with a summary paragraph or three about each:
- HMVC - Hierarchical Model-View-Controller
- MVVM - Model-View-ViewModel
- MVP - Model View Presenter
- MVA - Model View Adapter
- PAC - Presentation Abstraction Control
- RMR - Resource-Method-Representation
- ADR - Action-Domain-Responder
He talks about the similarities between them, mainly that they're all "triads" of functionality and that they all have the same basic purpose. He also suggests that they're all "pretending" to be application architectures.
If it's not clear where something fits in your application, that's a sign that your application architecture is flawed. Not that you need to introduce some magic in to get it to work. So let's admit that none of these are application architectures... And let's admit that there is a problem we need to solve.