ASP Source Code

 Migrating ASP

ASP.NET offers a very different programming paradigm from the script-oriented classic ASP model. ASP.NET is based on a concept of "a page is a class" and it is much stricter regarding matters of scope and the separation of HTML from declarative logic. Despite these differences, your ASP application source code can be extremely useful as a specification of a .NET web application.

By default, gmStudio provides an accurate and effective transformation to the ASP.NET platform. This allows you to begin developing and running your site on the ASP.NET platform which has immediate benefits in terms of maintainability, robustness, security, and performance.

gmStudio currently performs a variety of services to facilitate ASP migrations.

Analysis:

  • Reporting the "include order" of the site. This is used in planning the order of migration and making design decisions regarding creation of web controls. The include order report also reveals missing #includes. 
     
  • Reporting the definitions of subroutines and variables across the entire codebase. This is used in estimating the size and complexity of the logic in the ASP pages. 
     
  • Determining the dependencies between items across the codebase and on external COM components. This is also used in estimating the complexity of the ASP pages and in identifying needs and opportunities to eliminate COM Interop dependencies.

Migration:

  • Create a Web Application Project File for the entire site or a subset of pages. This project will reference all translated files and allow you to pre-build and thus help you validate the .NET logic. A web application project also facilitates debugging and deployment. It is also possible to produce a Web Directory project with some minor configuration changes. 
     
  • Rewrite all server-side VBScript to C# or VB.NET  (Note: gmStudio does not support translating server-side JScript to .NET)
     
  • gmStudio has a special feature that can translate client-side VBScript to client-side JavaScript.  (contact us for details)
  • Migrate ASP page directives to ASP.NET page directives 
     
  • Infer stronger types everywhere 
     
  • Deal with different semantics of ASP intrinsic collections (e.g., Response, Request) 
     
  • Replace external COM components with .NET components 
     
  • Restructure pages to ASPX pages with CodeBehind files 
     
  • Consolidate all declarative script code into CodeBehind files 
     
  • Convert #Includes to Code classes. An Author_Markup function is implemented in each include-class to render any markup that was originally contained in the #include file. Note that it is possible to migrate a specified #include file to a Web User Control using an appropriate registry-fixstatus command. 
     
  • Add logic to each page/include to declare and initialize any referenced code classes from includes. 
     
  • Rewrite markup formerly in render functions to use Response.Write calls 
     
  • Standardize and clean up HTML markup

Please see the FMStocks sample for examples.