Try our conversational search powered by Generative AI!

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

Vote:
 

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!

Thanks!
/Magnus

#44789
Oct 15, 2010 10:56
Vote:
 

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 http://antecknat.se/blog/2009/11/02/creating-classes-for-pagetypebuilder-in-an-existing-project/.

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.

#44864
Oct 19, 2010 8:40
Vote:
 

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.

#44866
Oct 19, 2010 10:01
Vote:
 

Thanks for the input guys, very much appreciated!

#44868
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.