tags:

views:

1829

answers:

5

Hi all,

I have been given the task of converting an old VB6 program to C#. Unfortunately the project has 8 modules, lots of code in each and tons of nested IF statements and just plan horrible design.

I am hoping to find a tool that would take all the files and generate some sort of UML diagram to show the basic flow of code to allow me to start debugging it.

The program takes in a number of different file types all with slightly different information, but it seems to just deal with them all in a number of large methods calling different methods here and there depending on what the information is.

I know I will have to taken some input files and step through it all looking for what it does in each situation so I can find the similarities and differences to be able to produce a more elegant solution which will be easier to maintain.

Thanks for any and all help

+2  A: 

this tool can be used as an addon for your Visual Studio to generate and reverse engineer your VB6 Project to Visual UML Diagrams.

Konstantinos
+1  A: 

Unfortunately it would not be easy to do that for a big project.

You could generate a class diagram with something like Sparx Enterprise Architect but then you'll have to spend some time cleaning it up before it will start making any sense. You'll probably have more luck with doing it on a particular part of the project instead of the whole lot.

Ilya Kochetov
A: 

A better approach is to write Unit Tests and refactor the code into a more convertible desing. Refactoring by Martin Fowler and NUnit are good places to starget

This issue is more fully discussed here along with links to the above.

How to switch from VB6 to VB.NET

RS Conley
A: 

Thank you Konstantinos and Ilya Kochetov,

I am downloading the tool at the moment.

I have given EA a go for the class diagrams and think it will help a bit, if the UML works then I think they will work well together.

Thank you RS Conley, we want to completely re write the application as it is very poorly designed and the requirements have changed since it was created. We are thinking if we examine what it does, how it does it and how a number of other, rather similar apps work we maybe able to create a more generic program that can deal with them all. This would allow us to consolidate a number of other legacy apps to .Net were we need to head to.

Jon
Be careful with the rewrite. Some quotes from Microsoft. "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". And again. "Performing a 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."
MarkJ
A: 

Visio 2000 Professional or Enterprise had this built in, if you have them or can get them. I don't know whether Visio 2007 still has the feature - you could try the 60-day trial.

MarkJ
Visio is good for diagramming, but not for modeling. It makes nice pretty pictures, using an old version of UML; does not do forward engineering, etc. It's no longer considered by Microsoft to be a software development tool.
John Saunders