There are a lot of problems converting a VB 6.0 app to .NET. So in a real life-time situation it is mostly not cost-effective to try and migrate everything in one step. Plus the programmers working on the project have to be trained in the new .NET language, C# or whatever. That calles for a slower approach. I call it Cross-Language Refactoring. The idea is to slowly replace performance critical or unmaintainable parts, while already implementing new features using the new language. Usually those new features interact with legacy code as well. So while the team is implementing a new feature, there is a chance to migrate those parts in the legacy code as well. This way the legacy code gets replaced bit by bit into the new object oriented world, while giving the team the time to get better at the new language.
I have a bit over 1 year experience in moving slowly from ASP to ASP.NET. There are a lot of problems there as well – but that would be a different article. Please feel free to contact me, if you need some pointers for that scenario. But this post will concentrate on moving a client app to .NET. Or at least start to do so.
There are two possible “slow” migration paths:
- Building a .NET GUI and integrating the legacy VB 6.0 through dlls
- Using the legacy interface and start replacing legacy modules by .NET modules
There are pros and cons to both approaches. The problem with the first migration path is, that it will use a lot of time to create a new GUI. On the other hand the second path will allow the user to still enjoy the old GUI and the old look-and-feel. But it is not an option when your GUI it too messed up, or is the reason why there is the need to migrate in the first place.
The MSDN-Magazin in May 2006 features an interesting article on how to make the second path possible:
Call Into The .NET Framework From Existing Visual Basic 6.0 Apps
Make sure to check it out before you are considering to migrate an application from VB 6.0 to .NET. Maybe a slow Cross-Language Refactoring approach is right for you as well.
On a different note: I would advise you to NOT move from VB 6.0 to VB.NET, but instead from VB 6.0 to C#. It turns out the programmers learning the new concept of object oriented programming, are way better at producing good code, when having a visual difference between the languages. When using VB.NET it is too tempting to use the old VB 6.0 “style” of programming and therefor neglecting patterns and oo design principles.