VB6 to ASP.NET Web - Applications Migration part 2
December 23, 2008 :: 9077 Views :: Download PDF:

This is the second article in a series of articles that describes the various migration options of desktop Client/Server applications to the Web or Cloud available using Visual WebGui as a migration solutions.
In order to discuss the migration process of legacy desktop applications to the web, we should first establish that there are 3 different types of desktop applications:
- Windows Forms based desktop application (C#/VB.NET). The UI layer is coded using .NET languages – the business can be .NET, COM+ or any other interop.
- VB6 based applications. The UI layer is coded with VB 6.0.
- Smart client or other desktop technologies (C++ MFC/ATL, Delphi, Java etc). Any other smart client technology based applications.
This document describes the process of converting VB6 based desktop applications to ASP.NET web using Visual WebGui's RIA platform migration solution.
VB6 to ASP.NET application migration
Background
Since the .NET Windows Forms development paradigm and API are actually an evolution of VB6, converting VB6 applications to Visual WebGui which is using the exact same paradigm and API is most natural.
The Process
VB6 based desktop applications can be converted to ASP.NET web using Visual WebGui in 3 different approaches:
- VB6 Project → Windows Forms .NET Project → Visual WebGui .NET Project
Converting the VB6 code to .NET using VWG partners' converters and then follow the process of converting .NET Windows Forms applications to VWG based ASP.NET Web as described in the first section of this document.
- VB6 UI using VB6 DL/BL → Visual WebGui UI using VB6 DL/BL
The application will keep using the existing BL/DL layers as COM/COM+ VB6 based components and only the UI is mimicked within a Visual WebGui project using the productive proven tools of .NET Windows Forms.
- VB6 Project → Visual WebGui Project
The entire application is mimicked within a Visual WebGui project and .NET using the productive proven tools of .NET Windows Forms.
Considerations & Exceptions
Except for the considerations and exceptions mentioned in the previous section “.NET Windows Forms to ASP.NET Web”, there are two additional subjects derived from the VB history of the project:
- The source project written in VB6 and might use non-Thread-Safe win32 or native API resources – those should be handled as potentially dangerous to the multi user web environment.
- Threading Model: activating a COM/COM+ components coded in VB6 is using “Single Thread” or “Single Thread Apartment“ threading models; Consider using the “STAThread” attribute decoration above any method that is accessing VB6 based COM/COM+.
Summary
Migration of VB6 application to the web using Visual WebGui's migration tool has the following advantages:
- The application can keep using the existing BL/DL services – no re-write or re-engineering is required.
- UI concepts, design patterns and practices can be migrated as is.
- UI elements and API in VB6 are very similar to WinForms so that migration of the UI to Visual WebGui is quite native.
- The effort you have to make in order to accomplish a fully functional web application is measurable.
Application migration – part 1 – .NET Windows Forms to ASP.NET Web
Application migration - part 3 – Smart Client Technologies to Web
Learn about Visual WebGui Migration solutions >
Download PDF