views:

124

answers:

3

Given that the VB6 runtime ships with Windows 7 and will continue to be supported for the lifetime of the OS (until January 2020) and that the VB6 IDE, though no longer supported, is fairly stable, what are the risks around keeping mission-critical applications in VB6 for the next several years?

+2  A: 

There are many risks... For example, if a security hole is found with the VB6 runtime - will MS invest the money to fix it? There is a good chance that they will, but at this point it's so old they might not bother.

The risk evaluation also needs to be based on how mission critical your app is, and how big / complicated it is. If this is at the core of your business and a single day's worth of downtime would bankrupt your business, I would be looking at replacing it pretty quickly with something that is actually supported.

The other side of the coin is, you have a lot of company. There is still a lot of VB6 code in production (I'm pretty sure that some of the stuff I wrote in VB6 is still running).

RQDQ
I'm going to disagree with some of your arguments here. The VB6 runtime is **part of Windows**. If Microsoft find a **security hole** in any part of Windows, they almost always immediately issue a hotfix. Also you say "replace with something that is actually supported" - the VB6 runtime is supported, actually.
MarkJ
+4  A: 

The official advice for owners of VB6 apps from Microsoft UK is:

[Do not upgrade or replace your VB6 application if] your application is working great, it has not required any changes for many years, there are no plans to extend the functionality, nor a need to integrate it with newer applications

That tells you the factors that increase risk for a VB6 application:

  • A need to change the application (bug fixes or new features).
  • A need to integrate the application with newer applications.
    • But integration doesn't require migration. Interop allows you to mix .Net code with VB6 (PDF whitepaper).

EDIT I forgot to mention the main risk. Migrating VB6 code to .Net can be a big task. In my opinion it's currently easier than it was in the early days: there are now excellent commercial tools; and some more recent VB.Net language features make it easier. The risk is that it may become harder again if you leave it too long. There will come a point when most people who are ever going to migrate have already migrated: then the tools may disappear and the community knowledge about migration may degrade. /EDIT

I'm sure Microsoft will eventually drop the VB6 runtime, but bear in mind that Windows 7 still supports 16-bit applications. And then there's virtual machines. Personally, I think VB6 applications will be running for a long while yet.

MarkJ
+3  A: 

One risk is that you are working in a language which developers mostly don't want to deal with. It will be harder to find good developers as current developers leave or you need to expand the application.

Furthermore, you are increasing the size of the code base which you might some day want to upgrade to another language.

Biggest of all is that adding new features to your VB6 application is more expensive than it would be if the application was in a better language like C# or VB.NET. This is because:

  1. VB6 developers cost more to employ. Since developers don't want to use VB6 they will demand more money to accept a position at your company (I would)
  2. .NET has a much larger standard library and more 3rd party components than VB6. In my experience, there are many more open source 3rd party components in .NET while the VB6 components are often proprietary.
  3. using Visual Studio 2008 or 2010 is more productive than the VB6 IDE because of all the improvements and features from the last 10 years.
  4. .NET has better unit testing support.
  5. C# is a better language than VB6. A good C# developer can write a feature much faster than a good VB6 developer because the language is much more powerful.
tster
I disagree with some of these points. In the current economic climate, at least in the UK, it's easy to recruit developers willing to work on VB6: we've taken on a couple of people recently. I think you're overselling the productivity boost from VS 2010/.Net/C#. They help, but I don't think you can write features "much faster". They are not silver bullets. Above all it is vital to realistically assess the investment in the **existing** features in the VB6 (i.e. the cost of migration) versus the needed work for any planned new features (the supposed savings later are some percentage of these).
MarkJ
@MarkJ, How well do you know C# (especially 3.5 and above)? People who think in less powerful languages (like VB6) often can't understand the gains from a more powerful language. Paul Graham called this the Blub Paradox.
tster
MarkJ
@MarkJ, I like Joel's essays, but I don't always agree with him. I find that I produce features much faster in C# than Java, Java than VB, VB than C. I find that I can write some applications much faster in Perl than in C#, but when complexity increases Perl looses it's advantage. Read this essay from Paul Graham for more info: http://www.paulgraham.com/avg.html. While you say LINQ, lambda expressions, Generics, etc. are "fun and useful" I consider them critical. My code is filled with them, and they allow me to express in a couple lines what would normally take dozens of lines.
tster