How do you migrate a large app from Visual Basic 6.0 to VB.NET? *

Question

My company makes a monolithic piece of software that our customers use to run their car dealerships. The original application was written in Visual Basic 6.0, and it has grown substantially over the last few years. Until now, there hasn't really been a business case for switching to the .NET framework. Sure, it's newer, considerably better at certain things, and when used correctly speeds development time, but there's nothing we can't do in Visual Basic 6.0 that we need to be able to do. Getting things done is harder in Visual Basic 6.0, but almost nothing is impossible. Recently though, Microsoft dropped support for Visual Basic 6.0, and it seems obvious to me that switching to a new platform is inevitable.

The way VB.NET works and requires you to think is so fundamentally different (heck, even the way you pass variables into subs has changed), and as far as I can tell, switching to .NET would require a complete re-design and re-write of the application.

My question(s): Have any of you been in this position? Of the tools available to smooth the transition, which ones work and which should be avoided? And how do I sell our customers and my boss on this? As the suits like to say, where's the ROI?


@Rob Burke:
Boatload of WinForms: Absolutely.
ADO code for DB access: Yes, but all in one easy-to-manage place.
ASP web pages: None. This is strictly a desktop app.
Custom controls: Yes, but all written by us (i.e. no third party stuff).
Installed base: ~1000 machines.

Last time I called Microsoft tech support (I would have been 16 or 17 at the time), I was having trouble getting the MSDN library to work on my machine (this is back in the days when MSDN wasn't available online, and internet connections were dial-up). After having my support case elevated, the "solution" they gave me was to format my hard drive and reinstall everything. Needless to say, I didn't consider that a solution.

Answer

The book on upgrading VB6 to VB.NET recommended by Jonathan is useful, but you don't have to buy it - it's available as a free download from Microsoft's web site.

My advice is don't underestimate the effort of conversion - be very cautious about embarking on a rewrite. It's a common pitfall to start out optimistically, make good early progress fixing some of the well-known flaws in the old architecture, and then get bogged down in the functionality that you've just been taking for granted for years. At this point your management begin to get twitchy and everything can get very uncomfortable.

...and here's a blog post by a Microsofty that agrees with me:

Many companies I worked with in the early days of .NET looked first at rewriting driven in part by a strong desire to improve the underlying architecture and code structures at the same time as they moved to .NET. Unfortunately many of those projects ran into difficulty and several were never completed. The problem they were trying to solve was too large

EDIT: (added this quote from a new excellent Microsoft webpage).

Performing a complete rewrite to .NET is far more costly and difficult to do well [than converting] ... we would only recommend this approach for a small number of situations.

Also the renowned VB expert Dan Appleman says:

In most cases porting [VB6 to VB.NET] is stupid and a complete waste of money.

And Joel said a while back:

The single worst strategic mistake that any software company can make [is to] decide to rewrite the code from scratch.

A couple of other useful links about migration including links to another free book from Microsoft. One. Two. EDIT: New Microsoft page including screencast with their answer to this question.

And finally, Microsoft have not actually totally dropped support for Visual Basic 6. The runtime is supported on Windows Vista, Windows 7, 8, and Server 2008 for the full support lifetime of those operating systems. See the official Microsoft statement.

< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/395/" >How do you migrate a large app from Visual Basic 6.0 to VB.NET?< /a>
Share on Google Plus

About Cinema Guy

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment