Porting (monolithic) classic ASP to ASP.Net

Over the years, my goal has been to exit ASP / VBScript into the โ€œbestโ€ language โ€” C # will be my preference, as I have C skills, but I would consider other languages โ€‹โ€‹(including PHP, etc.) not DotNet only)

The goal is for the code base to be in a language that does more for us. I hate the lack of data entry in VBScript, I would like to use several different "container objects", not just a dictionary, etc. - in fact, I wonder why, having moved from Basic to C in the 80s and then C ++ at that time after that I managed to move "back" to "Basic" at 00.

(I could program container objects in VBScript, but my instinct is that they will be slow in working, we have a significant cache of HTML โ€œfragmentsโ€ used to render the page, ASP Application Object is a pretty dumb tool!)

My ASP / VBScript is one large application, which is basically a web content delivery engine.

Many years have passed, and now ASP code rarely changes. (So โ€‹โ€‹I need to justify moving it at all or just live with VBScript โ€œforeverโ€)

It is managed from data in an MS SQL database.

There is only one .ASP page (consisting of several included files).

Based on the query string parameters, Skin and CMS templates for the page are loaded from the database and a suitable database. Scrolls are run to retrieve data that is combined into CMS templates.

Page data (usage methods, etc.) is also retrieved from the database, as well as information about access permissions, etc.

From what I read, some of these things can facilitate migration:

ASP sessions are not used - session cookie is used to retrieve session data from the database (so that I could easily share one and a half session with ASPX

VBScript uses OPTION EXPLICIT, so all variables are predefined.

All output is done through Response.Write (in fact, most of the content is combined into one variable and then output). There is no combination of HTML and <% server code%>.

I have several VBScript classes, but not many.

I have many VBScript functions and several routines.

I have a test suite. It captures screenshots from the browser and graphically compares them with the main images - so I have the opportunity to perform a regression test.

I do not have the resource to completely rewrite; maintaining the existing code needs to be continued during the migration; but, saying that 99% of our work is in CMS or SQL Sprocs, so changes to the ASP code are infrequent.

I read about MS utility to port ASP code to VB.NET. Given that my code is 100% VBScript and does not contain HTML / Script, would I appreciate it if it helped me a lot or a little?

I would be happy to reorganize STAYING IN VBscript in order to facilitate the transition to DotNet later (but I needed to know what my goals were in this :) :). Could I, for example, move some / all functions to a COM object and possibly do it piecemeal?

thanks for the help

+4
source share
2 answers

I have a large ASP ASP intranet that I supported until last year, and it was getting old, but new parts were still being added to ASP classic because there were already so many nested library code. You already have a good setup, if you often do not change the ASP code and have some form of testing. (I have to admit this the first time I heard about a screenshot). If everything is disconnected from the database and it works. do not break it.

PHP will give you the same problem of option types, but it will give you a world of options and options that make ASP classic look like a toy for children. Out of the box, PHP does everything I ever need to do.

ASP.net is a BIG structure. Understanding this correctly and completely is not an easy task, and it surprises me very much. he is trying to do something for developers coming out of the form environment automatically, which becomes very annoying when you get a very accurate rendering methodology, as you say, what you have. I found myself constantly struggling with technology until ASP.net MVC appeared. It suited my mind better because of how it worked, and did what I asked him to do, and nothing more. C # is an amazing language with brilliant features, and the DOT.net structure allows you to do anything if you can just find the pieces you need. There is so much that you will sometimes write something that has been done within the framework already, only to find it only after completing your own implementation.

In fact, migration can lead to some interesting problems. Although you can run an ASP.net page similar to an ASP classic page, you will lose many of the benefits of the environment as it is designed. Nevertheless, I did some tests aimed at transferring this site to ASP.net and managed to find ways around most of the stumbling blocks and came to the conclusion that such a migration would actually be a "simple job". The huge number of man-hours that would have been required for such a migration made implementation impossible.

Personally, I would not offer such a migration if you did not have several ASP.net projects under your belt, and they know about gotchas that asp.net brings with it.

I have not seen the ASP to ASP.net conversion tool you are talking about, but would like to get a link to it.

If you are in VBScript and donโ€™t know about the AX (ASP Xtreme Evolution) project here , I can suggest you explore it by inspiring to get past / around a few of the "classic" ASP limitations for the library of functions it provides.

+5
source

If you are looking for a way to justify a project for management, it is becoming increasingly difficult to find classic ASP developers to continue supporting your application. Any developer who has a choice will probably not want to support an application built using VBScript. Developers who do this work may consider it temporary and continue to look for another job.

Although I have not heard anything from Microsoft, it cannot be too many years before they decide to completely abandon the classic ASP.

+1
source

All Articles