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 Page History

« Previous Version 63 Next »

This section presents the sample upgrade solutions that are available for you to download, review, and reproduce.  The samples are less than 10K LOC each so they can be processed with the gmStudio Trial or Promotional Edition.

Installing the Samples

The gmStudio samples are available as zip files containing source codes and migration workspace files. They are installed independently of gmStudio. Links to the samples zip files are listed on the Downloads page.

In this section, [INSTALLDIR] refers to the folder where you unzipped each sample.

We regularly update the samples to follow our latest, best practices for using gmStudio; the documentation on this portal may describe older ways of doing things.  Please download the latest samples to see latest approaches.

The Sample Applications

The basic features of gmStudio are demonstrated by upgrading four small legacy applications:

  • FileExplorer: a desktop application that implements a highly simplified directory explorer. The application uses several common ActiveX controls (RichTextBox, TreeView, ListView, StatusBar, and Toolbar). The purpose of this sample is to demonstrate how to customize the translator to migrate ActiveX controls to .NET controls.
  • ScanTool: a desktop application that illustrates solutions to a number of translation challenges, such as multi-project translations, translation of COM events, API replacements, GoTo-style error handling, etc. ScanTool is a utility with limited runtime requirements so you will be able to run it on your desktop and verify by parallel testing that the .NET version of the migrated code is functionally equivalent to the original VB6 version. In addition, this sample demonstrates a variety of techniques for integrating hand-written code with the automated migration process. 
    • Demonstrates how to upgrade VB6 forms to WPF (Windows Presentation Foundation) 
    • Illustrates multi-project translations and translations of COM events 
    • Illustrates COM and Win32 API replacements, GoTo-style error handling, etc.
    • Shows how to generate stub assemblies and automatically integrate hand-written code with the tool-generated code

  • WPFScanTool:  the ScanTool sample modified to target WPF
    • See this article on how we used gmStudio's open transformation platform to update this sample to support VB.NET 
    • Note: this sample used a gmSL scripting language extension to generate xaml and to do WPF code transformations.  The use of gmSL is deprecated.  Going forward, WPF and other extremely advanced migrations features should be implemented using the gmSLAPI.  A gmslAPI demo and sample is available upon request and will be published soon.
  • FMStocks: a three-tier web application with two tiers (a data access layer and a business object layer) written in VB6 and a third tier (a web user interface) written in classic ASP. FMStocks has more complex runtime requirements than ScanTool, including a SQL server database with tables and stored procedures, an IIS website, and a number of COM components. The IIS setup is pretty trivial: just a virtual directory, but you will have to install the FMStocks2000 sample and the FMStocks database in SQL Server if you want to run the application.
  • RDO Deep Migration Sample: a small sample showing how the code relating to an API can be migrated in a somewhat dramatic manner. 
     

  • Waves: a stand-alone graphics/mathematics code illustrating the upgrading of advanced forms, graphics, and complex math logic
  • vb3DDefine: a stand-alone graphics/mathematics code illustrating the upgrading of advanced forms, graphics, and complex math logic

  • Calculator: a stand-alone calculator code illustrating the upgrading of control arrays and copy/paste editing through the clipboard

  • WPFCalculator: the Calculator sample modified to target WPF
    • Note: this sample used a gmSL scripting language extension to generate xaml and to do WPF code transformations.  The use of gmSL is deprecated.  Going forward, WPF and other extremely advanced migrations features should be implemented using the gmSLAPI.  A gmslAPI demo and sample is available upon request and will be published soon.
  • StringEvaluator: a stand-alone arithmetic and function elevator code illustrating Win32 API replacements, complex logic, and resource management

Running the Samples

You may run any one of the sample projects listed above, say ScanTool_csh.gmproj, as follows:

  1. Open its Migration Project file by Clicking [File/Open] and selecting the ScanTool_csh.gmproj file. 
  2. Run the migration by clicking the [Upgrade] button on the Toolbar. The results of the migration are deposited in the deployment folder of the migration workspace, 

The nature of the migrated code will be as specified by the Migration Project settings -- primarily by the directives in the different Translation Scripts associated with each migration unit in the project.  

Samples COM Dependencies

The samples are typical VB6/ASP systems that depend on COM APIs and controls. In order to run these samples on a machine, the necessary COM components must be installed and registered on that machine. The same requirement exists for reproducing the translations from scratch. If you do not have the COM components on your test machine, you may still examine the sample results which we generated in our test environment and packaged with each sample. Note that the generated results to not use COM interop and do not depend on COM.

If you have any problems with the samples please schedule a live demo and Q&A session with us, please schedule on our consultation calendar.


Where can you go from here?

We created gmStudio to be a comprehensive migration process development platform, not a run-once converter. There is much more to see and do:

  • You can inspect the various migration scripts, logs, reports, and config files to see how the migrations were customized and documented by the Great Migrations methodology.  
  • You can open a generated .NET project code in the Visual Studio IDE by selecting a migration task and clicking the [New IDE] button on the Toolbar or by opening the generated solution file.
  • You can see the generated files in the deployment folder by selecting a migration task and right clicking [Open .NET Project Folder] from the context menu.  
  • You can use gmStudio to browse, analyze, and summarize the various migration logs.  
  • You can read the remaining sections of this guide, experiment, and explore.  
  • Make your own sample: the Trial version will generate code for any VB6 project as long as you do not exceed the /wiki/spaces/GMG/pages/1574811
  • You can contact us for assistance or a guided tour.

  • No labels