Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 11 Next »

Overview


The FMStocks sample consists of two sets of projects:

  • FMSLib contains six inter-related VB6 libraries and one test executable
  • FMSWeb contains thirty-four ASP pages, which reference the six VB6 libraries in FMSLib.

 

The FMStocks sample shows how to migrate inter-related ASP and VB6/COM components. The application was published to demonstrate a 3-tier architecture (ASP, COM+, and SQL Server) in the context of a stock trading site with the following features:

  • Portfolio Management
     
  • Research/Buy/Sell Stocks
     
  • On-line Store
     
  • Forms-based Login

FMStocks, the Fitch and Mather Stocks 2000 sample, was created by Vertigo software and distributed through MSDN to demonstrate some of the best practices for building scalable web applications using ASP and COM+. FMStocks was also featured in the Patterns and Practices guide as an example of how to upgrade VB6 to .NET.

 

It consists of seven (7) VBPs (2500 LOC)

   FMStocks_DB.vbp      (Data Access)
   FMSStore_DB.vbp      (Data Access)
   FMSStore_Bus.vbp     (Business Objects)
   FMStocks_Bus.vbp     (Business Objects)
   FMSStore_Events.vbp  (Business Objects)
   FMStocks_Ext.vbp     (Business Objects)
   FMSTest.vbp          (A Simple Desktop Application Test Harness)

 

and thirty-four ASP pages (2300 LOC)

   ASP Pages
   Include files
   Pulp (images, css, client-side script files, etc.)

 

A pivot table of data produced by the Source Structure report for the FMStocks VB6 code is displayed below.

 

 

A pivot table of data produced by the Migration Set report for the FMStocks web site is displayed below.

 

 

The migration concepts introduced in the context of the ScanTool demo also apply to ASP-to-ASP.NET translations. For the most part, these concepts are all handled the same way for ASP as they are for VB6. In fact, gmStudio compiles both VB6 and ASP codes to the same intermediate semantic model format before analyzing and restructuring them to the target architecture. However, in addition to a programming language change -- in this case VB Script to C# or VB.Net -- ASP brings several fundamental migration challenges:

  • Subtle changes in the semantics of core ASP classes (Request, Response)
     
  • Scoping matters relating to nested and stacked ASP include files
     
  • Weak typing everywhere
     
  • Various obscure differences between the syntax VBScript and Visual Basic
     
  • Different rules for structuring markup and script tags
     
  • Different format and semantics of ASP directives
     
  • Looser coupling to COM, and
     
  • Architectural decisions regarding where and how to use the many powerful new features of ASP.NET

The FMStocks sample illustrates how gmStudio handles many of these matters for you. FMStocks also provides another example of VB to .NET migration because there is a set of VB6 COM objects behind the pages, which provide the business and data objects for the application.

COM Dependencies

FMStocks depends on the following external COM components that must be installed on your workstation to perform the migration successfully:

 

FileDescription
scrrun.dllMicrosoft Scripting Runtime
msado27.tlbMicrosoft ActiveX Data Objects 2.7 Library

 

 

Note: The version of FMStocks distributed as a sample here uses COM instead of COM+.

Deployment

The source codes for the FMSLib VB6 projects are located in the [INSTALLDIR]\samples\source\FMStocks\FMSLib subdirectory. The source code for the ASP pages is located in the [INSTALLDIR]\samples\source\FMStocks\FMSWeb\asp subdirectory. Four sample Migration Projects are included in the FMStocks example, depending on target language (C# or VB.NET) and treatment of referenced components (Interoped or migrated to .NET), as shown below: 

Project[.gmproj]Description
DemoFMSLib_cshAll inter-related VB6 DLLs migrated to C#.NET, all externals interoped
DemoFMSWeb_cshASP Site and FMSLib libraries migrated to C#.NET, all other externals interoped
DemoFMSLib_vbnAll inter-related VB6 DLLs migrated to VB.NET, all externals interoped
DemoFMSWeb_vbnASP Site and FMSLib libraries migrated to VB.NET, all other externals interoped

The FMStocks projects have the following deployment settings:

The VB6 Projects (COM libraries):

      ProjectFolder = [INSTALLDIR]\samples\workspace\FMStocks_[lang]
      DeployFolder  = %ProjFolder%\deploy\lib

The ASP Projects (web site):

      ProjectFolder = [INSTALLDIR]\samples\workspace\FMStocks_[lang]
      DeployFolder  = %ProjFolder%\deploy\web

Log files showing all migration steps are created in the workspace\log folders.

      [INSTALLDIR]\samples\workspace\FMStocks_[lang]\log

 

The .NET project files are deployed to the following folders:

.NET Library Code:

      [INSTALLDIR]\samples\workspace\FMStocks_[lang]\deploy\lib\[project]_std_[lang]

ASP.NET Site:

      [INSTALLDIR]\samples\workspace\FMStocks_[lang]\deploy\web

where:

      [project] is the name of the migration unit associated with each
                migration task in the migration project.

      [lang] is "csh" or "vbn" depending on target language choice.

 

  • No labels