Since the MVP pattern allows more testability and some reuse in webforms apps, i thought it would be a good first step to moving to MVC for legacy(webforms with code in codebehind, no pattern). As I refresh myself with MVP internals, it doesn’t seem so. Anyone have experience using this approach. Would it be better to just add MVC to your project and start porting pages/views?
Note: I have webform apps that inject controls dynamically, keepin the amount of pages down to 4 or less (single page webforms app).
Proper separation of concerns should make the transition easier if needed.
MVC framework is suitable only for web applications, while MVP can be more universal and can work for Web forms and Windows forms – views implement interfaces for presenters to use and views themselves handle implementation details pertaining to navigation.
You say that you insert controls dynamically. If you do this to have UI consist of reusable and self-sufficient components then this principle does not work well with MVC – controllers there want to have complete authority over a page and implementing that on MVC would lead to a mess of sub-actions, partial views and view model sharing.
In my opinion, MVP + Web Forms is best suited for Enterprise Web Applications where pages are highly modular with interconnected components,MVC – for general Web Sites where a page corresponds to a single action with domain object, usually CRUD or is optimized more for reading.