Best Practices for Upgrading Visual Basic 6.0 Projects to Visual Basic .NET


Published on

Best Practices for Upgrading Visual Basic 6.0 Projects to Visual Basic .NET

Published in: News & Politics
1 Comment
  • Best Practices for Upgrading Visual Basic 6.0 Projects to Visual Basic .NET
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Best Practices for Upgrading Visual Basic 6.0 Projects to Visual Basic .NET

    1. 2. Best Practices for Upgrading Visual Basic ® 6.0 Projects to Visual Basic .NET Name Title Microsoft Corporation
    2. 3. Agenda <ul><li>Upgrade Overview </li></ul><ul><li>Common Upgrade Issues </li></ul><ul><li>Upgrade Summary </li></ul>
    3. 4. Upgrade Overview To Upgrade, or not to Upgrade? <ul><li>Upgrading Is Not A Requirement </li></ul><ul><ul><li>Leave Existing Code in Visual Basic 6.0 </li></ul></ul><ul><ul><ul><li>Continue developing in Visual Basic 6.0 </li></ul></ul></ul><ul><ul><ul><li>Or interoperate between Visual Basic 6.0 and Visual Basic .NET </li></ul></ul></ul><ul><ul><li>Selective Replacement </li></ul></ul><ul><ul><li>Upgrade to Visual Basic .NET </li></ul></ul><ul><li>Considerations </li></ul><ul><ul><li>Application Architecture and Technologies </li></ul></ul><ul><ul><li>Maintenance or New Development </li></ul></ul>
    4. 5. Upgrade Overview Your First Upgrade <ul><li>Open Project in Visual Basic .NET </li></ul><ul><li>Run the Upgrade Wizard </li></ul><ul><li>Project Doesn’t Compile or Run </li></ul><ul><li>Why? </li></ul>Upgrade VB6 Project ???
    5. 6. Upgrade Overview The Upgrade Wizard <ul><li>Automatically Upgrades 95% </li></ul>Form Layout ActiveX Controls ADO Data Binding Code Syntax Changes COM Libraries RES files Upgrade Report
    6. 7. Upgrade Overview Finishing The Upgrade <ul><li>Prepare Visual Basic 6.0 application </li></ul><ul><ul><li>See “Preparing Your VB6 Application For The Upgrade To VB.NET” </li></ul></ul><ul><li>Fix issues </li></ul><ul><ul><li>Micro issues </li></ul></ul><ul><ul><li>Macro issues </li></ul></ul><ul><li>Add new features </li></ul>Upgraded Project Add Features Fix Issues Visual Basic .NET Upgrade Visual Basic 6.0
    7. 8. Common Upgrade Issues Micro Issues User defined type APIs Non zero arrays LSet App object Variants ActiveForm Strongly type Resolve default properties Some Automatic, Some Manual Initialization code marshalling attributes Replace ‘As Any’ with overloads Zero based arrays, or System.Array Custom method
    8. 9. Demo 1: Micro Issues
    9. 10. Common Upgrade Issues Macro Issues Transactions ActiveX documents DHTML pages Deterministic finalization Graphics On x Goto RDO/DAO data binding StrPtr, ObjPtr, VarPtr Leave in Visual Basic 6.0 Navigate to Visual Basic .NET Memory pinning Use GDI+ Dispose Use GC methods Use ADO .NET System. EnterpriseServices Select..Case
    10. 11. Common Upgrade Issues Upgrading Transactions <ul><li>Inherit from System.ServicedComponent </li></ul><ul><li>Add attributes </li></ul><ul><ul><li>Assembly </li></ul></ul><ul><ul><li>Class </li></ul></ul><ul><ul><li>Method </li></ul></ul><ul><li>Create strong name </li></ul>
    11. 12. Demo 2: Macro Issues
    12. 13. Upgrade Summary Why Upgrade <ul><li>Make New Enhancements in Less Time </li></ul><ul><ul><li>Integrate with web services </li></ul></ul><ul><ul><li>Expose web services </li></ul></ul><ul><ul><li>Application specific performance counters </li></ul></ul><ul><ul><li>Integrate with the event log </li></ul></ul><ul><ul><li>Just about anything the client asks for will be easier with .NET (it certainly won’t be harder) </li></ul></ul><ul><li>Let Your Developers Become Technology Leaders </li></ul><ul><li>Lower Deployment Costs </li></ul><ul><li>Lower Maintenance Costs </li></ul><ul><li>Beat the Competition </li></ul>
    13. 14. Upgrade Summary Why Upgrade <ul><li>First Class Object-Oriented Constructs </li></ul><ul><ul><li>Inheritance </li></ul></ul><ul><ul><li>Structure exception handling </li></ul></ul><ul><ul><li>Parameterized constructors </li></ul></ul><ul><li>Windows ® Forms </li></ul><ul><ul><li>Visual inheritance </li></ul></ul><ul><ul><li>Control anchoring, in-place menu editor </li></ul></ul><ul><ul><li>Connected and disconnected databinding </li></ul></ul>
    14. 15. Upgrade Summary Why Upgrade <ul><li>Web And Server Features </li></ul><ul><ul><li>Web forms </li></ul></ul><ul><ul><li>Web services </li></ul></ul><ul><ul><li>RAD for the server </li></ul></ul><ul><li>Better Deployment </li></ul><ul><ul><li>DLLs Don’t Need to Register! </li></ul></ul><ul><ul><li>XCopy Deployment </li></ul></ul><ul><ul><li>Builds .msi and .cab setup programs </li></ul></ul>
    15. 16. Upgrade Summary Why Upgrade <ul><li>Power Features </li></ul><ul><ul><li>Multi-threading </li></ul></ul><ul><ul><li>Debugging across all languages </li></ul></ul><ul><li>Built From The Ground-up on .NET Framework </li></ul><ul><ul><li>Direct access to .NET classes </li></ul></ul><ul><ul><li>Code access security </li></ul></ul><ul><li>ADO .NET </li></ul><ul><li>XML </li></ul>
    16. 17. Upgrade Summary Lessons Learned <ul><li>Start with one component </li></ul><ul><li>Slowest part of upgrade is debugging runtime errors </li></ul><ul><li>Testing is important </li></ul><ul><li>Upgrading is much faster than rewriting </li></ul><ul><ul><li>Expect upgrading to take 5 – 10% of the original development time </li></ul></ul><ul><li>Upgrade first, then Enhance </li></ul>
    17. 18. Upgrade Summary After The Upgrade Is Complete <ul><li>Positioned For the Future </li></ul><ul><li>Competitive Advantage </li></ul><ul><li>Achieve Better Code Reuse </li></ul><ul><li>Attract and Retain Resources </li></ul><ul><li>Easily Meet Client Requests </li></ul><ul><li>Eliminate the Common Frustrations </li></ul><ul><ul><li>Deployment </li></ul></ul><ul><ul><li>Maintenance </li></ul></ul><ul><ul><li>Development </li></ul></ul>
    18. 19. MSDN Subscriptions THE way to get Visual Studio .NET Visual Studio .NET MSDN Subscriptions NEW <ul><li>Professional </li></ul><ul><li>Tools to build applications and XML Web services for Windows and the Web </li></ul>MSDN Professional $1199 new $899 renewal/upgrade MSDN Enterprise $2199 new $1599 renewal/upgrade MSDN Universal $2799 new $2299 renewal/upgrade <ul><li>Enterprise Developer </li></ul><ul><li>Enterprise lifecycle tools </li></ul><ul><li>Team development support </li></ul><ul><li>Core .NET Enterprise Servers </li></ul><ul><li>Enterprise Architect </li></ul><ul><li>Software and data modeling </li></ul><ul><li>Enterprise templates </li></ul><ul><li>Architectural guidance </li></ul>
    19. 20. Resources <ul><li>“ Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET ” – MS Press </li></ul><ul><li>MSDN Articles </li></ul><ul><ul><li>“ Preparing Your Visual Basic 6.0 Applications For the Upgrade to Visual Basic .NET” </li></ul></ul><ul><ul><li>“ Upgrading Your Visual Basic 6.0 Applications to Microsoft Visual Basic .NET” </li></ul></ul><ul><li>Visual Basic .NET Upgrade Guide </li></ul><ul><ul><li> </li></ul></ul><ul><li>ArtinSoft Consulting Services </li></ul><ul><li>Microsoft Tech·Ed 2002 </li></ul><ul><ul><li>New Orleans, LA </li></ul></ul><ul><ul><li>April 9 – 13, 2002 </li></ul></ul><ul><ul><li> </li></ul></ul>
    20. 21. Questions?
    21. 22. © 2001 Microsoft Corporation. All rights reserved.