0

I was recently interviewed in a company where I was asked the difference between MVC and MVP(since I have worked in GWT).

I told him that in MVP, data(Model) is decoupled from View whereas in MVC, View and Model interacts with each other. He didn't look satisfied with this answer.

Did I say anything wrong?

Then, he asked me why there is no controller in MVP. What are its advantages/disadvantages? I was totally blank on this.

Can you please provide your inputs?

Anand
  • 20,708
  • 48
  • 131
  • 198

2 Answers2

1

I found an article on this at What are MVP and MVC and what is the difference?. Generally mvc is more of a website style appoach where mvp is more of a .net approach (thought you could take a mvvm way too). The mvp is more of a hands on approach, where it interacts with the view much more where as the controller will just talk to both the model and view view passing data to it and the mvp will take to it that way as well as data binding and possibly making part of the view.

Community
  • 1
  • 1
Ian Overton
  • 1,060
  • 7
  • 17
1

I hope this simplified representation will help. The image is example of typical MVC usage in classical web application and the usage of MVP in fat-client web app.

enter image description here

I would not talk about disadv. / advantages, because both of them fit well in different circumstances.

Goran Nastov
  • 995
  • 1
  • 9
  • 17