In my opinion, the differences for all variants of Model View Controller models ( MVP , Passive View , Controller Control , Model View, etc. ) are quite subtle. It's all about who processes the data and takes data from anyone, really. They all try to solve the same problem by separating something from another thing, and the solutions do it all in a similar way.
It is clear that the concepts are similar in implementation when you think about it in visual terms:
Simplistic MVC: +-------+ manipulates data | Model |<---------------------+ +-------+ | | | | gets data | v | +------------+ serves data +------+ | Controller |------------->| View | +------------+ +------+ Simplistic MVP: +-------+ | Model | +-------+ | ^ | | get/manipulates data v | +-----------+ serve data +------+ | Presenter |-------------->| View | | |<--------------| | +-----------+ tell changes +------+
They are similar in that the class hierarchy may look the same in both. However, the difference lies in different ways of displaying and processing data. When you roll out your own MVC, you are responsible for how it should look.
In fact, this is not so important, since they are all based on the principle of separating code fragments into independent logical entities and reducing code duplication. As long as you keep the combination code low it should work well, after all. This only matters if you want to be a dogmatic consequence of your application architecture.
Be pragmatic about this and do what works best for your needs, as you will get the mixture anyway. It should be βprettyβ easy to switch between options depending on what you need to view. Follow SOLID principles and you should do your best. (See Also About SOLID .)
I would suggest you study if there are MVC or MVP frameworks to see how this is done.
Spike
source share