views:

51

answers:

2

I have a portfolio made in C#/ASP.NET which started off small but, as it is selling myself, it has grown in size very quickly.

I started off with using ASP.NET webforms model but this has meant that some of my code is in class libraries (.dlls) and some in page codebehind.

I want to fix this (no defined stucture), but without the overhead of migrating to ASP.NET MVC or WCSF.

How could I address these problems? I am thinking of moving all logic to WCF services and calling them from page codebehind. Is there a better way?

EDIT: The current problem is codebehind (used only as the site was small at the start but now it gets a lot of attention from me with updates). I want to seperate this all out so it's easy to test (what MVC addresses), and the coupling is generally low. Is it enough to use WCF to achieve this? What other techniques could I employ? Maintainability is another concern because maintaining a codebase split between .dlls is awkward (when debugging, as I noticed and mentioned in some previous threads).

Thanks

A: 

I cant fully imagine what you need, but consider URL redirection / slug

Ahmed Khalaf
See my edit. Thanks.
dotnetdev
A: 

Unfortunately, traditional web forms applications are damn near impossible to test. WCF won't be of much help because it's a communications technology that will help you to get the data to codebehind classes but won't help you to render or test pages.

Due to this complexity, there are very few test automation tools, and the few there are are commercial paid-for products. One such tool I have heard of, but have not used personally, is Ivonna. You can also test using browser automation. Two great tools to help with this purpose are watin and WebAii.

This is, of course, dependent on whether you still want to keep the original code lying around. What I take in when I read your post is that you want all of the benefits of MVC. Unfortunately, it may be best to take the plunge and rewrite the application. It's painful, I know, but the sheer amount of hackery to make WebForms ape MVC concepts is overwhelming, to say the least.

David Andres