Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

For a better development practice what do you prefer MVP or MVC and why ?

user-image
Question ajoutée par Rami Khasawneh , Solutions Architect , Bloomberg BNA
Date de publication: 2013/09/26
Khadijah Shtayat
par Khadijah Shtayat , Technical Lead , Opensooq

Itsdepend of application  project focuse and project desgin as you see on follwing pictuers how the MVC and MVP act but keep in mind that

MVC is advantageous to use when components are redrawn on every event received from the user.

MVP was invented on a bit different conditions - when you build the application based on component framework and there is no need to constantly recreate the View.

MVC

 

MVP

MVC and MVP paradigms are quite similar to each other but their usage depends on the number of conditions. For MVC when View is refreshed every time on a particular event and for MVP when it is not required to recreate View every time.

Arief Shah
par Arief Shah , Software Developer/Project Manager , Durat

if you are starting a new project, then ASP.net MVC is a better choice. But if you just want to refactor an existing project then MVP is the option because there is no easy way to convert those web-forms codes to MVC.

 

Hope this helps if so please like the answer

Rami Khasawneh
par Rami Khasawneh , Solutions Architect , Bloomberg BNA

As the last paragraphin your reply, key defference between both is complexity. Though MVP is abstracted from MVC it cannot handle complex views. MVP can handle one view per presenter so we can say you can share the view among presenters, where MVC can share controller to multiple views and allowing to display the appropriate view according page behavior.

Thanks for your reply

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?