0

Is it possible to write an app with an MVP structure in ASP.NET MVC or are you forced into the MVC structure. I have been trying to use MVP in an ASP.NET webforms app but have run up against problems injecting dependencies - something which is made much easier in ASP.NET MVC so i'm told.

Chi
  • 105
  • 3
  • 13
  • 1
    Do you mean MVP or MVC? – Mark Redman Jan 23 '17 at 10:08
  • http://stackoverflow.com/questions/2056/what-are-mvp-and-mvc-and-what-is-the-difference MVC would seem more appropriate. –  Jan 23 '17 at 10:16
  • 1
    I mean MVP. I would like to follow an MVP design but use ASP.NET MVC if it is possible since webforms is a pain to perform DI with. With ASP.NET MVC I know that constructor injection is possible but I would prefer to have the structure of MVP. Might it be straightforwards to make adjustments so that the Controller became a Presenter for example? – Chi Jan 23 '17 at 15:17
  • I think you would be better with Web API, I think MVC will get in the way if you want to do MVP. Can I ask you why you want to use MVP rather than MVC? Or other option could be do MVC with no logic on controller and create MVP using some front-end framework like knockout or angular... – xszaboj Jan 23 '17 at 15:38
  • 1
    MVC is for doing MVC. It's in the name you know. So when you go that way you leave MVP behind. That is more suited to event driven environments anyway, you simply won't need it. Go with the flow. – H H Jan 23 '17 at 16:05

0 Answers0