Model View Presenter (MVP) VS Model View Controller (MVC)

As a Computer Science Professional I am here to tell you there is no real difference between MVC and MVP even though the following article seems say there is:

Whether or not a View knows about or has contact with a Model or not is a very moot point for the following reason:

View as a means of presenting information MUST have knowledge of the Model !!!

MVP seems to say a View does not have interactions with a Model however the purpose of a View is to present data from the Model for user interaction therefore one cannot have a functional View unless it knows about the data.

MVP can claim the Presenter funnels data to the view all day long however this notion is trumped by the very simple fact that the View MUST have access to the data in order to be functional as a means of obtaining user interaction.

So let’s say in MVP the View knows nothing about the Model because it is the Presenter that knows about the data; so we make an API the View can use when it needs data from the Model.  This is exactly the same thing as allowing the View to interact with the data from the Model because Views exist to show data from Models.

No matter what we do Views and Models will always be closely related !!!

MVP is therefore nothing but a conceptualization one cannot hope to achieve because any View that does not know about its data is useless as a View.

Controllers or Presenters will ALWAYS have to know about the data from the Model because Controller/Presenter must know how to push data into the Database as well as retrieve data from the database – this is largely why the Controller/Presenter exists.

Views will ALWAYS have to know about the data because this is why the View exists; Views exist to interact with the user and users want to see the data.

Models will ALWAYS have to know about the data and provide data to the View either directly in MVC or indirectly in MVP however since Views exist to handle data from Models and Models exist to provide data to Views there is little to be gained from claiming Views and Models are not as closely related as they must be.

But again, you will always find people who think hot water is very different from cold water when all along both hot and cold water are still wet.  Likewise, MVP and MVC must do the very same work or they are useless; do too much with MVP and it becomes MVC and vice-versa just as hot water can become cold water when energy is allowed to be acted-upon my entropy.

Those who wish to market their skills will always come on the scene and make claims about their ideas when all they are really doing is showing the rest of us they are talking about the same concepts that have always existed.

Within the context of a single Application or System all Model-View-Controller triads regardless of what they are called are intimately connected to each other and CANNOT be logically separated from each other other than through some conceptualization that lacks any real substance.  Model Objects from one Application might be used by another Application with a different set of Views however this does not necessarily make the Models completely separate from either Application’s Views.  The same thing can be said about Controller/Presenter objects and Views.  Views from one Application CANNOT be easily copied to a different Application without their associated Models.

Since MVP seeks to tie Presenters to Views one makes it far more difficult to separate Views from Presenters just as Models cannot be easily separated from Views in the MVC Model – so in the end MVC has as many strengths and weaknesses as MVP even though each conceptualization tends to present what appears to be a different set of strengths and weaknesses.

MVP only seems to improve MVC… it may actually do the opposite for all anyone knows.

I am sure my views will not make me popular among those who love MVP however I believe my views to be well founded in Computer Science.

Traditional MVC Fails to Win the Day

Click This Link:

Traditional MVC Fails to Win the Day

(FYI – The link presented here in the text of this post takes you to the original Blog Article… Click it, always click the links…)

The MVC Design Pattern

The MVC (Model Viewer Controller) Design Pattern is seen as being the holy grail of software engineering in some circles.  Some people put so much faith in MVC that they will not consider any other design pattern even when another design pattern results in less work.

Here is a really good case in point.

Read more of this post

%d bloggers like this: