SlideShare une entreprise Scribd logo
1  sur  32
Meeting Objectives
• Your Objectives
      – Understand the challenges of migrating
         VB6/ASP/COM to .NET
      – Understand the role of translation technology as part of a
        .NET adoption effort.
      – Understand the tool-assisted approach to Migration.


• Great Migrations’ Objectives
      – Educate you on the challenges of migrating
        VB6/ASP/COM to .NET and potential solutions
      – Help you get started!


07/10/09                    Copyright Great Migrations LLC                  1
Agenda

• gmBasic 101
• Technical Demonstration
      – A Sample VB6 Application
      – Demo: Migration to C# / VB.NET
      – Demo: Source Code Analytics
      – Demo: Source Code Restructuring
• The Great Migrations Methodology
      – The Tool Assisted Re-Write
• Wrap Up
07/10/09                Copyright Great Migrations LLC      2
gmBasic 101
                                                               Compreh
                                                                       ensive Se
                                                                                 mantic Sys
What is gmBasic?                                                                            tem Model

            A highly configurable, robust
              VB6/ASP/COM compiler
            that produces source codes
                 instead of binaries.

How does it work?
–     Compiler: Builds a comprehensive semantic
      model of the codebase implementation.

–     Analyzer: evaluates and restructures the model
      to fit the desired architecture patterns.

–     Author: processes the optimized model to
      generate clean, correct code that meets
      custom standards and conventions.


Compiler               Analyzer!               Author


 07/10/09                                  Copyright Great Migrations LLC                        3
gmBasic 101

   Semantic Model
• Symbol Trees
      – External Components
      – Language Elements
      – Source Structures

• P-Code Tables
      – Operations
      – Expressions
      – Source Mappings


07/10/09                  Copyright Great Migrations LLC            4
gmBasic 101

                   Assertions
• Solving the semantics problem is the key

• Semantic translation can be achieved
  systematically by combining linguistic theories for
  natural language processing with proven principles
  of compiler and interpreter design

• Source and target language/syntax differences are
  trivial in comparison to runtime differences

07/10/09              Copyright Great Migrations LLC            5
gmBasic 102

Compiler                                                   Source
                                                           Codes

• Preparation
   – Load Language Description                                      Compiler      Initial
                                                                                Semantic
                                                                                 Model
                                                 Config
   – Load Source Codes

   – Load Interface Descriptions
                                                                    Analyzer!
• Recognition
   – Pass 1: create symbol tables of all
     identifiers in the codebase

   – Pass 2: create initial semantic
                                                                     Author
     model of all low level operations
     performed by each codeblock.



 07/10/09                       Copyright Great Migrations LLC                              6
gmBasic 102

Analyzer
• Interpretation
                                                              Compiler
   – Type Inference

   – Coding Analysis

• Restructuring
   – Create Migrated                   Config
                                                              Analyzer !    Migrated
                                                                            Semantic
     Semantic Model                                                          Model


   – Add/Remove/Change
     Operations
                                                               Author
   – Optimizations/Cleanup

   – API Replacements

 07/10/09                    Copyright Great Migrations LLC                            7
gmBasic 102

Author                                                  Compiler

• Code Generation
   – String Machine
                                                        Analyzer!
   – Executes the
     migrated model

• Reporting                                                                  Migrated Symbol
                                                         Author                    Tables
                           Config
                                                                             Migrated Semantic
   – Boilerplate                                                                   Model


                                                                    Target
   – File Deployment                                                Codes


     Instructions
 07/10/09              Copyright Great Migrations LLC                                     8
Demo: Overview

                                                                   VB.Net
                            Migration                              Interop
                            Toolset                                           VB.Net
                                                                             Managed
           VB6
           COM
                       Language        Interface
                        Config          Config                                 C#
                                                                             Managed
                                                                     C#
                                                                   Interop


   •       A Sample Application
   •       VB6 to C#, VB6 to VB.Net (externs interoped)
   •       VB6 to C#, VB6 to VB.Net (externs taken to .Net)
   •       Look at Code, Build, Report, Run
07/10/09                          Copyright Great Migrations LLC                       9
A Sample VB6 Application: ScanTool
                                                  •     Two VBPs: UI.exe and LIB.dll
                                                  •     Lib talks back to UI via events
                                                  •     4 External COM APIs
                                                  •     Win32 APIs
                                                  •     Many VB Intrinsics
                                                  •     Object Polymorphism
                                                  •     Error Handling
                                                  •     Over 2000 LOC



                                                              ScanToolUI

                                                         ScanToolLib




                                                  COM COM COM COM
                                                      Scripting   MSXML   Typelib   Common
                                                                           Info      Dialog



07/10/09         Copyright Great Migrations LLC                                         10
ScanTool Metrics

                                                             •   Project Structure
Project Structure Report                                          –   A very crude metric
                                                                  –   Conceptual Design
                                                                  –   Completeness
                                                                  –   Iceberg Report

                                                             •   Project References
                                                                  – Rough idea of
                                                                    external
                                                                    dependencies
                                                                  – Some Internals
                                                                    Details

                                                             •   VB6 Build Test
Project References Report




  07/10/09                  Copyright Great Migrations LLC                                  11
Demo: Migration to C#

– Migration Set: DemoScanTool                                gmStudio


– Dialect = C# (csh)
– Migration Mode = std

– Run Translation
– Deploy Translation
– Build Translation
– Inspect Translation
– Run ScanTool.NET

 07/10/09               Copyright Great Migrations LLC                  12
Demo: Migration to VB.Net

– Migration Set: DemoScanTool
– Dialect: VB.Net (vbn)
– Migration Mode = std


– Run Translation
– Deploy Translation
– Build Translation
– Inspect Translation
– Run ScanTool.NET

 07/10/09               Copyright Great Migrations LLC   13
Source Code Analytics
                                     Analytics-References Report
• What really matters:
     – How you actually use
       COM/VB6 APIs
     AND
     – How you intend to
       replace them on the
       new platform.

• All API replacements are
  NOT created equal!



 07/10/09                 Copyright Great Migrations LLC            14
Source Code Restructuring
                                                                                        VB.Net
Managed Interface Descriptions                                       Migration          Interop
                                                                     Toolset                       VB.Net
•   Template Generated from COM                                                                   Managed
                                            VB6
•   Map source API to target API            COM
                                                                Language    Interface
                                                                 Config      Config                 C#
                                                                                                  Managed
                                                                                          C#
                                                                                        Interop
Scrrun.dll.xml




MSXML4.dll.xml




    07/10/09                   Copyright Great Migrations LLC                                       15
Demo: Source Code Restructuring




                                                ScanToolUI



                                         ScanToolLib




                                      .NET          .NET     COM       COM
                                       System       System   Typelib   Common
                                         .IO         .Xml     Info      Dialog




07/10/09       Copyright Great Migrations LLC                             16
Sidebar: Translation Flexibility

• Rules for mapping of COM/Win32 APIs to .NET replacements

• Rules for mapping ASP/VB6 coding patterns to .NET coding patterns

• Processing order for a multi-component translation

• Instructions to address problems or anomalies in the source codes

• Rules for target file names, folder names, etc.

• Rules for target Visual Studio project files (resx, assemblyinfo, *proj)

• Rules for formatting – blank lines, comments, indenting, boilerplate code

• Special processing instructions that control details of translator operation

 07/10/09                       Copyright Great Migrations LLC               17
Demo: BuildSet

                                                                     BuildSet
              VB6               Migration
             CODE               Toolset                               .Net
                                                                      Code

                           Language            Interface
             COM            Config              Config                .NET
            Externals                                                 Stubs



                BuildSet (n): A collection of VB6 code and COM
                binaries migrated to .NET such that the VB6 code
Interop         becomes .NET code and the COM binaries
                become 100% managed code (a prototype object
                model). This is a good starting point for teams that
                want to avoid COM interop while preserving the
                general aspects of their original design.
 07/10/09                        Copyright Great Migrations LLC                 18
Sample 2: A Web Application
                                            • Six VBPs (2500 LOC)
                                               – 2 VBPs Data Access
                                               – 4 VBPs Business Objects
                                            • 33 ASP pages (2300 LOC)
                                               – 5 includes (nested and stacked)
                                               – 28 pages
                                            • Poster Child DNA Web App
                                               –   Portfolio Management
                                               –   Research/Buy/Sell Stocks
                                               –   On-line Store
                                               –   Forms-based Login


                                              Web Pages (ASP/VBS)

                                                   Business Objects

                                               Data Access Objects
                                                    (ADODB)

                                                     Stored Procs
                                                     SQL Server
07/10/09   Copyright Great Migrations LLC                                     19
FMStocks Metrics

Project Structure Report                                      • Project Structure
                                                                 –   A very crude metric
                                                                 –   Naming Standards
                                                                 –   Completeness
                                                                 –   May reveal some
                                                                     design concepts

                                                              • Project References
                                                                 – Rough idea of external
                                                                   dependencies
Project References Report                                        – Some Internals Details
                                                                 – May reveal design

                                                              • VB6 Build Test




  07/10/09                  Copyright Great Migrations LLC                                 20
Demo: Migrating ASP to ASP.Net

ASP is quite different from VB6
•   Include Files
•   VBScript nuances
•   Most COM References are implicit
•   Weak typing everywhere

What can we do today?
•   Produce clean, correct ASP.NET

• Create a Web Application Project

•   Restructure Pages
     •    Consolidate Declarative Script
          to CodeBehind files
     •    Translate Render Functions
          to Response. Write in
          Codebehind Files
     •    Restructure #Include to
          Web UserControls

•   Translate VBScript to C# or VB.NET
     •    Propagate COM replacements across
          VB6/ASP as needed
     •    Strong Typing everywhere
     •    Deal with different semantics of
          ASP intrinsic collections (Response, Request)

    07/10/09                                         Copyright Great Migrations LLC   21
Source Code Analytics -- ASP

<%@ Language=VBScript %>
                                                Analytics-References Report
<%option explicit%>
<% Response.Buffer = true%>
<OBJECT RUNAT=server
    PROGID=FMStocks_Bus.Ticker id=ObjAccount>
</OBJECT>
<OBJECT RUNAT=server
    PROGID=FMStocks_Bus.Broker id=ObjBroker>
</OBJECT>
...

<%
...
Function PlaceBuyOrder()
    On Error Resume Next
    PlaceBuyOrder = 0 ' assume it fails
    'this will be a long to represent the number of
    shares.
    Dim lngShares

   'convert to a long incase of fractions of shares.
   lngShares= clng(Shares)

   PlaceBuyOrder = ObjBroker.BuyStock(g_AccountID,
   Ticker, lngShares)
   if Err.number <> 0 or PlaceBuyOrder = 0 then
      MainPrompt = BUYSTOCK_PURCHASE_FAILED

       ' PlaceBuyOrder = 0 doesn't necessarily mean
         there was an error
       if Err.number <> 0 then
               BuildErrorMessage()
       end if

       Exit Function
    end if
End Function
...
%>




     07/10/09                                          Copyright Great Migrations LLC   22
Sidebar: API Crossing


                                 .NET                                      Be wary of Top-Down Migrations
                               Application                                 (PiecePorting)
             .NET
           System.IO       System.IO.FileInfo

                                                                           • COM interfaces have COM types as
                                                                             member parameters and return
             COM
                              Scripting.File                                 types.
            Scripting

                                                                           • If you interop COM components, your
                                                                             .NET clients will end up straddling the
                                                                             fence between COM and .NET and
                                                                             this will require more interop code
                COM                                                          which runs counter to the premise of
                                Interoped                                    adopting .NET in first place.
               Scripting
                                  COM
                               Component

                                                                                                         PiecePort




07/10/09                                        Copyright Great Migrations LLC                                         23
Sidebar: API Crossing
                                                                Bottom-Up, SmartPort Migrations
                        .NET                                    •
      .NET                                                            pBasic remembers what it has translated and knows which
                      Application
    System.IO                                                         components are going to .NET.
                                                                •     it uses this information to generate clean, native code in client
                   System.IO.FileInfo                                 applications.

                                                                                       Generated Interface Description
                                                                                       ScanToolLib.dll.xml




         .NET
       System.IO
                        .NET
                      Component



                                                                                                                         ASPX              ASPX      ASPX     ASPX
                                                     ASP                         ASP
                                        ASP
                                                                     ASP
                                                                                                       Migration                  .NET     .NET
                                                                                                        Studio
                                                VB
                                                           VB
                                                                            VB
                                                                                                       promula           .NET     .NET     .NET      .NET
                                        VB                          VB
                                                     VB                                                 Basic

                                                     COM Framework                                                                  .Net Framework
                                                                                                       Custom
                                                                                                     Configuration
                                             VB6/ASP Application Portfolio                                                      .NET Application Portfolio




07/10/09                                                            Copyright Great Migrations LLC                                                           24
Great Migrations Methodology

                                Balanced




                 The Great Migrations Methodology balances
                 automated translation and other techniques
                    to improve the conversion process to
           deliver high quality results with less risk and less effort.



07/10/09                           Copyright Great Migrations LLC         25
Great Migrations Methodology
                                      Iterative
Preparation: organizing the source codebase, defining migration requirements.

Translation: converting the source codebase to the target codebase

Verification: inspecting the target codebase for functional an architectural quality

Cut Over: taking the target codebase through final testing and deployment to production


       V B 6/                                           Semantic
                        Preparation
       A SP                                            Translation         Cut-Over   .NET
                                        Design




                                      Verification




07/10/09                                  Copyright Great Migrations LLC                     26
Great Migrations Methodology
                                                                                         Code Quality
                                  Translation Tuning                            Level 1: Translation Complete
                                                                                Level 2: Build Complete
VB6/ASP/COM
                                                                                Level 3: Production Ready
  Codebase      Translate                Build                           Run


                Upgrade                                                                 Phase 1
 Architecture    Tool
Requirements
                                                                                         .NET Code
                            Resolve Translation Issues                                     Level 1


                                                                                         .NET Code
                                        Resolve Build Issues                               Level 2




                                                                                        Phase 2
                                Resolve Architecture Issues
                                                                                         .NET Code
                                                                         Test              Level 3
                                  Resolve Functional Issues

                                                                                       Fit & Finish



                                                                                   .NET Production Code




  07/10/09                              Copyright Great Migrations LLC                                27
Great Migrations Methodology




07/10/09   Copyright Great Migrations LLC   28
Great Migrations Methodology


                         Translation Tuning
  Design                     Iterate                                                                            Deployment
                                                                                    Conversion
                                                                                  CutOver
Conversion                                                                                      System            Limited
                                                                                 Translation
 Guides                                                             Code                         Test           Deployment
                          Prepare               Partial
                  Code                                              Snap
                                                System                                 Fix &
                  Snap                                              Shot
    Revised                     Translate        Tests                                 Finish        Load            Full
   Estimates      Shot                                                                               Test         Deployment
                                       Verify




               Test Environment            Ready               Dev                 Cutover                Dev    Upgrade
Scope Set &
                 Established            for Cutover           Freeze             Translation             Thaw    Complete
 Estimates
  Refined




  07/10/09                                      Copyright Great Migrations LLC                                           29
The Great Migrations Difference
                                                                                      Translation                                                .NET
                                                                                                                    Cut Over                   Codebase

Clean, Correct, Custom Translation
• Tools
       – Translation Solutions
                                        VB
                                                                   Preparation                      Verification
       – Choice of .Net Language     Codebase


       – Flexible Restructuring
       – Multi-Project Capability
       – Analytics
• Processes
       – Migration Methodology
       – Automation
       – Control
• People                                    ASP
                                                        ASP                     ASP
                                                                                                                               ASPX              ASPX      ASPX    ASPX



       – Migration Expertise
                                                                   ASP
                                                                                                      Migration                         .NET     .NET
                                                                                                       Studio
                                                   VB
                                                              VB
                                                                          VB
                                                                                                      promula                  .NET     .NET     .NET      .NET
                                           VB                      VB
                                                        VB                                             Basic

                                                        COM Framework                                                                     .Net Framework
                                                                                                      Custom
                                                                                                    Configuration
                                                VB6/ASP Application Portfolio                                                         .NET Application Portfolio



 07/10/09                             Copyright Great Migrations LLC                                                                                         30
Meeting Objectives

• Your Objectives
      – Understand the challenges of migrating
         VB6/ASP/COM to .NET
      – Understand the role of translation technology as part of
        a .NET adoption effort.
      – Understand the tool-assisted approach to Migration.


• Great Migrations’ Objectives
      – Educate you on the challenges of migrating VB6/ASP/
        COM to .NET and potential solutions
      – Help you get started!

07/10/09                    Copyright Great Migrations LLC                  31
Thoughts?



07/10/09    Copyright Great Migrations LLC   32

Contenu connexe

Tendances

openCPQ - A React-Based Product-Configuration Toolkit
openCPQ - A React-Based Product-Configuration ToolkitopenCPQ - A React-Based Product-Configuration Toolkit
openCPQ - A React-Based Product-Configuration ToolkitTim Geisler
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)dpc
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)dpc
 
Java vs .net
Java vs .netJava vs .net
Java vs .netTech_MX
 
Visual COBOL Development for Unix and Java
Visual COBOL Development for Unix and JavaVisual COBOL Development for Unix and Java
Visual COBOL Development for Unix and JavaMicro Focus
 
Alok_ResumeHclJul
Alok_ResumeHclJulAlok_ResumeHclJul
Alok_ResumeHclJulAlok Behera
 
Different phases of a compiler
Different phases of a compilerDifferent phases of a compiler
Different phases of a compilerSumit Sinha
 

Tendances (9)

openCPQ - A React-Based Product-Configuration Toolkit
openCPQ - A React-Based Product-Configuration ToolkitopenCPQ - A React-Based Product-Configuration Toolkit
openCPQ - A React-Based Product-Configuration Toolkit
 
C intro
C introC intro
C intro
 
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
DPC2007 CodeGear, Delphi For PHP (Pawel Glowacki)
 
DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)DPC2007 Zend Framework (Gaylord Aulke)
DPC2007 Zend Framework (Gaylord Aulke)
 
Project Zero JavaOne 2008
Project Zero JavaOne 2008Project Zero JavaOne 2008
Project Zero JavaOne 2008
 
Java vs .net
Java vs .netJava vs .net
Java vs .net
 
Visual COBOL Development for Unix and Java
Visual COBOL Development for Unix and JavaVisual COBOL Development for Unix and Java
Visual COBOL Development for Unix and Java
 
Alok_ResumeHclJul
Alok_ResumeHclJulAlok_ResumeHclJul
Alok_ResumeHclJul
 
Different phases of a compiler
Different phases of a compilerDifferent phases of a compiler
Different phases of a compiler
 

Similaire à VB6 Migration Objectives

Cd ch1 - introduction
Cd   ch1 - introductionCd   ch1 - introduction
Cd ch1 - introductionmengistu23
 
CD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptxCD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptxZiyadMohammed17
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptxAshenafiGirma5
 
Introduction to compiler
Introduction to compilerIntroduction to compiler
Introduction to compilerAbha Damani
 
M3 Modernization Case Study
M3 Modernization Case StudyM3 Modernization Case Study
M3 Modernization Case StudyADC Austin Tech
 
Project P erts2012
Project P erts2012Project P erts2012
Project P erts2012AdaCore
 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionEelco Visser
 
Непрерывное тестирование для улучшения качества кода
Непрерывное тестирование для улучшения качества кодаНепрерывное тестирование для улучшения качества кода
Непрерывное тестирование для улучшения качества кодаSQALab
 
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...chiportal
 
Node.js BFFs: our way to better/micro frontends
Node.js BFFs: our way to better/micro frontendsNode.js BFFs: our way to better/micro frontends
Node.js BFFs: our way to better/micro frontendsEugene Fidelin
 
Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...
Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...
Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...majid lotfinia
 
Kitware: Qt and Scientific Computing
Kitware: Qt and Scientific ComputingKitware: Qt and Scientific Computing
Kitware: Qt and Scientific Computingaccount inactive
 
Tony Blaes Resume
Tony Blaes ResumeTony Blaes Resume
Tony Blaes Resumetblaes
 
414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integration414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integrationTrevor Dolby
 
Using LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache ArrowUsing LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache ArrowDataWorks Summit
 
A classification framework for component models
A classification framework for component modelsA classification framework for component models
A classification framework for component modelsIvica Crnkovic
 

Similaire à VB6 Migration Objectives (20)

Chap01-Intro.ppt
Chap01-Intro.pptChap01-Intro.ppt
Chap01-Intro.ppt
 
Cd ch1 - introduction
Cd   ch1 - introductionCd   ch1 - introduction
Cd ch1 - introduction
 
CD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptxCD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptx
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptx
 
Introduction to compiler
Introduction to compilerIntroduction to compiler
Introduction to compiler
 
M3 Modernization Case Study
M3 Modernization Case StudyM3 Modernization Case Study
M3 Modernization Case Study
 
Project P erts2012
Project P erts2012Project P erts2012
Project P erts2012
 
Compiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler ConstructionCompiler Construction | Lecture 17 | Beyond Compiler Construction
Compiler Construction | Lecture 17 | Beyond Compiler Construction
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Непрерывное тестирование для улучшения качества кода
Непрерывное тестирование для улучшения качества кодаНепрерывное тестирование для улучшения качества кода
Непрерывное тестирование для улучшения качества кода
 
Types of Compilers
Types of CompilersTypes of Compilers
Types of Compilers
 
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
Software Parallelisation & Platform Generation for Heterogeneous Multicore Ar...
 
Node.js BFFs: our way to better/micro frontends
Node.js BFFs: our way to better/micro frontendsNode.js BFFs: our way to better/micro frontends
Node.js BFFs: our way to better/micro frontends
 
Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...
Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...
Model-To-Text Transformation Language chapter 9 – J Cabot model driven engine...
 
Kitware: Qt and Scientific Computing
Kitware: Qt and Scientific ComputingKitware: Qt and Scientific Computing
Kitware: Qt and Scientific Computing
 
Tony Blaes Resume
Tony Blaes ResumeTony Blaes Resume
Tony Blaes Resume
 
414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integration414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integration
 
Os Lattner
Os LattnerOs Lattner
Os Lattner
 
Using LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache ArrowUsing LLVM to accelerate processing of data in Apache Arrow
Using LLVM to accelerate processing of data in Apache Arrow
 
A classification framework for component models
A classification framework for component modelsA classification framework for component models
A classification framework for component models
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Dernier (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

VB6 Migration Objectives

  • 1. Meeting Objectives • Your Objectives – Understand the challenges of migrating VB6/ASP/COM to .NET – Understand the role of translation technology as part of a .NET adoption effort. – Understand the tool-assisted approach to Migration. • Great Migrations’ Objectives – Educate you on the challenges of migrating VB6/ASP/COM to .NET and potential solutions – Help you get started! 07/10/09 Copyright Great Migrations LLC 1
  • 2. Agenda • gmBasic 101 • Technical Demonstration – A Sample VB6 Application – Demo: Migration to C# / VB.NET – Demo: Source Code Analytics – Demo: Source Code Restructuring • The Great Migrations Methodology – The Tool Assisted Re-Write • Wrap Up 07/10/09 Copyright Great Migrations LLC 2
  • 3. gmBasic 101 Compreh ensive Se mantic Sys What is gmBasic? tem Model A highly configurable, robust VB6/ASP/COM compiler that produces source codes instead of binaries. How does it work? – Compiler: Builds a comprehensive semantic model of the codebase implementation. – Analyzer: evaluates and restructures the model to fit the desired architecture patterns. – Author: processes the optimized model to generate clean, correct code that meets custom standards and conventions. Compiler Analyzer! Author 07/10/09 Copyright Great Migrations LLC 3
  • 4. gmBasic 101 Semantic Model • Symbol Trees – External Components – Language Elements – Source Structures • P-Code Tables – Operations – Expressions – Source Mappings 07/10/09 Copyright Great Migrations LLC 4
  • 5. gmBasic 101 Assertions • Solving the semantics problem is the key • Semantic translation can be achieved systematically by combining linguistic theories for natural language processing with proven principles of compiler and interpreter design • Source and target language/syntax differences are trivial in comparison to runtime differences 07/10/09 Copyright Great Migrations LLC 5
  • 6. gmBasic 102 Compiler Source Codes • Preparation – Load Language Description Compiler Initial Semantic Model Config – Load Source Codes – Load Interface Descriptions Analyzer! • Recognition – Pass 1: create symbol tables of all identifiers in the codebase – Pass 2: create initial semantic Author model of all low level operations performed by each codeblock. 07/10/09 Copyright Great Migrations LLC 6
  • 7. gmBasic 102 Analyzer • Interpretation Compiler – Type Inference – Coding Analysis • Restructuring – Create Migrated Config Analyzer ! Migrated Semantic Semantic Model Model – Add/Remove/Change Operations Author – Optimizations/Cleanup – API Replacements 07/10/09 Copyright Great Migrations LLC 7
  • 8. gmBasic 102 Author Compiler • Code Generation – String Machine Analyzer! – Executes the migrated model • Reporting Migrated Symbol Author Tables Config Migrated Semantic – Boilerplate Model Target – File Deployment Codes Instructions 07/10/09 Copyright Great Migrations LLC 8
  • 9. Demo: Overview VB.Net Migration Interop Toolset VB.Net Managed VB6 COM Language Interface Config Config C# Managed C# Interop • A Sample Application • VB6 to C#, VB6 to VB.Net (externs interoped) • VB6 to C#, VB6 to VB.Net (externs taken to .Net) • Look at Code, Build, Report, Run 07/10/09 Copyright Great Migrations LLC 9
  • 10. A Sample VB6 Application: ScanTool • Two VBPs: UI.exe and LIB.dll • Lib talks back to UI via events • 4 External COM APIs • Win32 APIs • Many VB Intrinsics • Object Polymorphism • Error Handling • Over 2000 LOC ScanToolUI ScanToolLib COM COM COM COM Scripting MSXML Typelib Common Info Dialog 07/10/09 Copyright Great Migrations LLC 10
  • 11. ScanTool Metrics • Project Structure Project Structure Report – A very crude metric – Conceptual Design – Completeness – Iceberg Report • Project References – Rough idea of external dependencies – Some Internals Details • VB6 Build Test Project References Report 07/10/09 Copyright Great Migrations LLC 11
  • 12. Demo: Migration to C# – Migration Set: DemoScanTool gmStudio – Dialect = C# (csh) – Migration Mode = std – Run Translation – Deploy Translation – Build Translation – Inspect Translation – Run ScanTool.NET 07/10/09 Copyright Great Migrations LLC 12
  • 13. Demo: Migration to VB.Net – Migration Set: DemoScanTool – Dialect: VB.Net (vbn) – Migration Mode = std – Run Translation – Deploy Translation – Build Translation – Inspect Translation – Run ScanTool.NET 07/10/09 Copyright Great Migrations LLC 13
  • 14. Source Code Analytics Analytics-References Report • What really matters: – How you actually use COM/VB6 APIs AND – How you intend to replace them on the new platform. • All API replacements are NOT created equal! 07/10/09 Copyright Great Migrations LLC 14
  • 15. Source Code Restructuring VB.Net Managed Interface Descriptions Migration Interop Toolset VB.Net • Template Generated from COM Managed VB6 • Map source API to target API COM Language Interface Config Config C# Managed C# Interop Scrrun.dll.xml MSXML4.dll.xml 07/10/09 Copyright Great Migrations LLC 15
  • 16. Demo: Source Code Restructuring ScanToolUI ScanToolLib .NET .NET COM COM System System Typelib Common .IO .Xml Info Dialog 07/10/09 Copyright Great Migrations LLC 16
  • 17. Sidebar: Translation Flexibility • Rules for mapping of COM/Win32 APIs to .NET replacements • Rules for mapping ASP/VB6 coding patterns to .NET coding patterns • Processing order for a multi-component translation • Instructions to address problems or anomalies in the source codes • Rules for target file names, folder names, etc. • Rules for target Visual Studio project files (resx, assemblyinfo, *proj) • Rules for formatting – blank lines, comments, indenting, boilerplate code • Special processing instructions that control details of translator operation 07/10/09 Copyright Great Migrations LLC 17
  • 18. Demo: BuildSet BuildSet VB6 Migration CODE Toolset .Net Code Language Interface COM Config Config .NET Externals Stubs BuildSet (n): A collection of VB6 code and COM binaries migrated to .NET such that the VB6 code Interop becomes .NET code and the COM binaries become 100% managed code (a prototype object model). This is a good starting point for teams that want to avoid COM interop while preserving the general aspects of their original design. 07/10/09 Copyright Great Migrations LLC 18
  • 19. Sample 2: A Web Application • Six VBPs (2500 LOC) – 2 VBPs Data Access – 4 VBPs Business Objects • 33 ASP pages (2300 LOC) – 5 includes (nested and stacked) – 28 pages • Poster Child DNA Web App – Portfolio Management – Research/Buy/Sell Stocks – On-line Store – Forms-based Login Web Pages (ASP/VBS) Business Objects Data Access Objects (ADODB) Stored Procs SQL Server 07/10/09 Copyright Great Migrations LLC 19
  • 20. FMStocks Metrics Project Structure Report • Project Structure – A very crude metric – Naming Standards – Completeness – May reveal some design concepts • Project References – Rough idea of external dependencies Project References Report – Some Internals Details – May reveal design • VB6 Build Test 07/10/09 Copyright Great Migrations LLC 20
  • 21. Demo: Migrating ASP to ASP.Net ASP is quite different from VB6 • Include Files • VBScript nuances • Most COM References are implicit • Weak typing everywhere What can we do today? • Produce clean, correct ASP.NET • Create a Web Application Project • Restructure Pages • Consolidate Declarative Script to CodeBehind files • Translate Render Functions to Response. Write in Codebehind Files • Restructure #Include to Web UserControls • Translate VBScript to C# or VB.NET • Propagate COM replacements across VB6/ASP as needed • Strong Typing everywhere • Deal with different semantics of ASP intrinsic collections (Response, Request) 07/10/09 Copyright Great Migrations LLC 21
  • 22. Source Code Analytics -- ASP <%@ Language=VBScript %> Analytics-References Report <%option explicit%> <% Response.Buffer = true%> <OBJECT RUNAT=server PROGID=FMStocks_Bus.Ticker id=ObjAccount> </OBJECT> <OBJECT RUNAT=server PROGID=FMStocks_Bus.Broker id=ObjBroker> </OBJECT> ... <% ... Function PlaceBuyOrder() On Error Resume Next PlaceBuyOrder = 0 ' assume it fails 'this will be a long to represent the number of shares. Dim lngShares 'convert to a long incase of fractions of shares. lngShares= clng(Shares) PlaceBuyOrder = ObjBroker.BuyStock(g_AccountID, Ticker, lngShares) if Err.number <> 0 or PlaceBuyOrder = 0 then MainPrompt = BUYSTOCK_PURCHASE_FAILED ' PlaceBuyOrder = 0 doesn't necessarily mean there was an error if Err.number <> 0 then BuildErrorMessage() end if Exit Function end if End Function ... %> 07/10/09 Copyright Great Migrations LLC 22
  • 23. Sidebar: API Crossing .NET Be wary of Top-Down Migrations Application (PiecePorting) .NET System.IO System.IO.FileInfo • COM interfaces have COM types as member parameters and return COM Scripting.File types. Scripting • If you interop COM components, your .NET clients will end up straddling the fence between COM and .NET and this will require more interop code COM which runs counter to the premise of Interoped adopting .NET in first place. Scripting COM Component PiecePort 07/10/09 Copyright Great Migrations LLC 23
  • 24. Sidebar: API Crossing Bottom-Up, SmartPort Migrations .NET • .NET pBasic remembers what it has translated and knows which Application System.IO components are going to .NET. • it uses this information to generate clean, native code in client System.IO.FileInfo applications. Generated Interface Description ScanToolLib.dll.xml .NET System.IO .NET Component ASPX ASPX ASPX ASPX ASP ASP ASP ASP Migration .NET .NET Studio VB VB VB promula .NET .NET .NET .NET VB VB VB Basic COM Framework .Net Framework Custom Configuration VB6/ASP Application Portfolio .NET Application Portfolio 07/10/09 Copyright Great Migrations LLC 24
  • 25. Great Migrations Methodology Balanced The Great Migrations Methodology balances automated translation and other techniques to improve the conversion process to deliver high quality results with less risk and less effort. 07/10/09 Copyright Great Migrations LLC 25
  • 26. Great Migrations Methodology Iterative Preparation: organizing the source codebase, defining migration requirements. Translation: converting the source codebase to the target codebase Verification: inspecting the target codebase for functional an architectural quality Cut Over: taking the target codebase through final testing and deployment to production V B 6/ Semantic Preparation A SP Translation Cut-Over .NET Design Verification 07/10/09 Copyright Great Migrations LLC 26
  • 27. Great Migrations Methodology Code Quality Translation Tuning Level 1: Translation Complete Level 2: Build Complete VB6/ASP/COM Level 3: Production Ready Codebase Translate Build Run Upgrade Phase 1 Architecture Tool Requirements .NET Code Resolve Translation Issues Level 1 .NET Code Resolve Build Issues Level 2 Phase 2 Resolve Architecture Issues .NET Code Test Level 3 Resolve Functional Issues Fit & Finish .NET Production Code 07/10/09 Copyright Great Migrations LLC 27
  • 28. Great Migrations Methodology 07/10/09 Copyright Great Migrations LLC 28
  • 29. Great Migrations Methodology Translation Tuning Design Iterate Deployment Conversion CutOver Conversion System Limited Translation Guides Code Test Deployment Prepare Partial Code Snap System Fix & Snap Shot Revised Translate Tests Finish Load Full Estimates Shot Test Deployment Verify Test Environment Ready Dev Cutover Dev Upgrade Scope Set & Established for Cutover Freeze Translation Thaw Complete Estimates Refined 07/10/09 Copyright Great Migrations LLC 29
  • 30. The Great Migrations Difference Translation .NET Cut Over Codebase Clean, Correct, Custom Translation • Tools – Translation Solutions VB Preparation Verification – Choice of .Net Language Codebase – Flexible Restructuring – Multi-Project Capability – Analytics • Processes – Migration Methodology – Automation – Control • People ASP ASP ASP ASPX ASPX ASPX ASPX – Migration Expertise ASP Migration .NET .NET Studio VB VB VB promula .NET .NET .NET .NET VB VB VB Basic COM Framework .Net Framework Custom Configuration VB6/ASP Application Portfolio .NET Application Portfolio 07/10/09 Copyright Great Migrations LLC 30
  • 31. Meeting Objectives • Your Objectives – Understand the challenges of migrating VB6/ASP/COM to .NET – Understand the role of translation technology as part of a .NET adoption effort. – Understand the tool-assisted approach to Migration. • Great Migrations’ Objectives – Educate you on the challenges of migrating VB6/ASP/ COM to .NET and potential solutions – Help you get started! 07/10/09 Copyright Great Migrations LLC 31
  • 32. Thoughts? 07/10/09 Copyright Great Migrations LLC 32