Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Converting legacy project to PTB and EPiMVP - experiences and thoughts?


Has anyone successfully converted a "good" old "we-put-1500-lines-of-code-in-the-aspx.cs" to use PTB and perhaps even EPiMVP. Can it be done a little at a time - I mean is it possible to have a project which is partly EPiMVP and PTB without having a total meltdown (both in the project and the brains)?

Any experiences and suggestions greatly appreciated!


Oct 15, 2010 10:56

Hey Magnus,

Regarding converting a brownfield app to use PTB I think the "app" Erik Nordin made can help you with that. See his blog post here

The story of converting a webforms app to MVP I'm not sure about. I'm only aware of one site that's using EPi MVP and that was a greenfield project. And if I know the ""we-put-1500-lines-of-code-in-the-aspx.cs" projects (which, sadly, I do) I'm guessing that there hasn't been a lot of focus on SOLID etc which would make taking advantage of the MVP pattern quite heavy on the refactoring. And the (and I'm going with my gut feeling here) complete lack of tests ain't going to help that refactoring process.

I'm not sure if it's possible to run both webforms and MVP at the same time. Would be nice though since you could "upgrade" the site a piece at the time.

Oct 19, 2010 8:40

I've upgraded two larger projects from "we-put-1500-lines-of-code-in-the-aspx.cs" to use PTB(but not EPiMVP), and there is no problem doing that.

Usually start of by using the tool linked in the post above, and change the use of TemplatePage to the PTB ones. Then when you need to add or modify some functionality you clean up that code, changes it to strongly typed and reusable code instead. I think it's a waste of time (compared to what you are payed for) to change the whole project to strongly typed and reusable code right away. If you want to do that, it might be better to rewrite the whole thing from scratch.

Oct 19, 2010 10:01

Thanks for the input guys, very much appreciated!

Oct 19, 2010 11:00
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.