Migrating Visual Basic 6.0 Applications to .NET

Migrating Applications from Visual Basic 6

Introduction

The first thing that you need to ask is, "Do I need to move my application to .NET?" If the answer is "Yes," you have a lot of though choices to make, such as:

  1. Should I go for an application re-design?
  2. Should I just use the VB to VB.NET migration tool just so my code compiles and runs as managed code?

    If you choose the latter, you have think on the lines of whether to write an automated tool to make this happen or to do a manual migration. I call it porting; it is not exactly migration.

  3. Should I convert the VB code to .NET first and then go for a re-design?

The Problem

You have decided to migrate Visual Basic applications to .NET and need to define a strategy for migrating Visual Basic applications to Microsoft C#.NET or VB.NET.

The Strategy

The strategy changes in each case based on the following scenarios.

Scenario 1: Application Redesign

  1. Remodel the application design from your existing VB 6.0 design.
  2. Analyze the existing design and identify areas for improvement based on the features provided by the .NET framework.
  3. Re-design component functionality based on Step 2.
  4. Perform a Proof Of Concept/Prototype build.
  5. Identify resources and prepare estimates.
  6. Further down with Construction, Testing, Parallel, runs, and so forth.

Scenario 2: Apples to Apples.NET Migration

  1. Evaluate the existing application.
  2. Perform a Proof Of Concept/Prototype build.
  3. Identify resources and prepare estimates.
  4. Use the standard VB to VB.NET migration tool.
  5. Make further code changes/modifications based on your customized requirements, ones that the migration tool cannot handle.
  6. Proceed with testing, parallel runs, and so on.

This scenario works well when you just have one application to migrate. If you have more than one application to migrate, you should start thinking about automating Steps 2 and 3 or, at the least, Step 3.

Instead of having your developers do all the changes manually, it might be worthwhile to write an automated migration tool that will take care of the following:

  1. Running the VB to VB.NET migration tool on your existing applications.
  2. Customizing the converted VB.NET code based on your requirements.
  3. Compiling and building the converted code.
  4. If your preferred language is C#, use the VB.NET to C# conversion tool and then recompile and build the new code.

Basically, automate code generation, modification, and compilation.

Scenario 3: Combo.NET

I have seen some companies that want to follow this approach:

  1. Execute Scenario 2.
  2. Stabilize .NET application in production.
  3. Execute Scenario 1.

If you really want to make your existing VB applications powerful and your enterprise is moving towards service orientation, you might want to take a phased approach and then move to .NET. In this case, you will find this scenario more cost effective and the resulting applications will be more scalable and reusable.

Conclusion

There are a lot of strategies people talk about and all are pretty much based on the above-mentioned scenarios except the one that says "copy and paste your code into VS.NET IDE, iteratively compile and fix it until it works;" no, I wouldn't recommend that route.

It all depends on feasibility, so weigh your options, formulate, and finalize a strategy for your migration efforts.



About the Author

Yogi Abhyankar

Yogi Abhyankar


Yogi Abhyankar is a Microsoft Certified Solutions Developer for .NET and is working with the Microsoft.NET platform for several years. He has a Bachelor's and Master's degree in Computer Science. Contact information Email: emailyogi@gmail.com

Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Managing your company's financials is the backbone of your business and is vital to the long-term health and viability of your company. To continue applying the necessary financial rigor to support rapid growth, the accounting department needs the right tools to most efficiently do their job. Read this white paper to understand the 10 essentials of a complete financial management system and how the right solution can help you keep up with the rapidly changing business world.

  • With 81% of employees using their phones at work, companies have stopped asking: "Is corporate data leaking from personal devices?" and started asking: "How do we effectively prevent corporate data from leaking from personal devices?" The answer has not been simple. ZixOne raises the bar on BYOD security by not allowing email data to reside on the device. In addition, Zix allows employees to maintain complete control of their personal device, therefore satisfying privacy demands of valued employees and the …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds