tags:

views:

89

answers:

3

I work with a actively developed production web application that is written entirely in Classic ASP. Like most classic asp applications it is a mess full of spaghetti code. So I am beginning to break pieces into simple VB classes to gain some basic encapsulation benefits.

While creating the classes I feel conflicted that a higher level language to do so. Are there any recommendations on how this could be done? I have two thoughts:

COM Objects and Web services. I'm leaning towards the web service route but would greatly appreciate any suggestions on how to best encapsulate the business logic of a Classic ASP system into a higher level language.

What do you recommend?

+2  A: 

As a start I recommend you read about MVC.

Then you can switch to a framework that support such a concept, such as the ASP.NET MVC and got even further by using a SoC tools, like Castle Windsor, NHibernate, etc.

If you don't want to embark on such a OMG start from scratch journey, then a web service will be the preferred solution for encapsulating the business logic. (following the model-view design pattern).

COM objects will be a bad solution for this task. They are not intended for web applications or logic management.

Am
+1 not just coz im an mvc fan but from classic ASP (where u haven't seen asp.net webforms) MVC is almost the logical approach
cottsak
A: 

I attempted to "simplify" a classic ASP site of mine a few months ago, primarily using COM objects. I didn't find the experience particularly satisfactory. I didn't have much time to devote to the project and I never got the development environment to gel properly so debugging etc was an ongoing pain. Writing the objects in C# was straight-forward but integrating them on the production server was a hassle.

In the end the I just cleaned up the data-access layer and related classes within Classic ASP itself. This definitely gave the best ROI in terms of time spent, etc.

I sometimes feel as if I ought to have a go at replacing some of the site with COM objects or similar, but I struggle to justify to myself why that'd be a good idea.

Anyway, regardless of the approach you take I'd suggest you ensure that your development process is as seamless as you can make it. This is not necessarily straight-forward when at least half of it will be classic ASP based.

dantefs
+1  A: 

You might be interested in using ajaxed which has been built to support legacy classic asp apps.

Michal