473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Migrating VB6 to VB.NET

Frinavale
9,735 Expert Mod 8TB
I have been researching the best approach to migrating a VB6 application into a VB.NET application. There is a lot of information out there but most of it recommends that you "train in the migration process before jumping into it". One site even recommends that this training process should take at least 2-3 weeks. I'm not sure how you can train for such a process...but maybe I'll find something while I'm researching.

I was wondering if anyone here has taken part in such a project?
Do you have an pointers on the process?

At first I was thinking that we should just redesign/rewrite each component in our existing application but the more I read about the migration tool the more I think it might be the better approach (so long as we adequately prep our VB6 code for the migration).

I have also been told that the migration tool is not a good idea from a trusted source. I am apprehensive about migration tools out there. Some of them "delete redundant code" and auto-magically modify things so that they are coded to the "best practice" standards...but these standards might not necessarily be the standards that we want to use.

Like I said, at this point I'm doing a lot of research and so I have a very opened mind.
I would love to hear from someone who's actually tackled such a project.

-Frinny
Dec 1 '09 #1
3 4602
mjuras
3
I have been focused on VB6/ASP/COM to ,NET migration pretty much exclusively since 2005 -- in fact I design, develop, and sell migration tools and deliver migration projects for a living. Our migration tools can delete redundant code and restructure code, but they do NOT work automagically -- they are software and they are developed by programmers. In our case the lead developer is a mathematician and linguist who has been writing compilers and translators since 1974). Our VB6/ASP/COM translator is actually a compiler hooked up to a state of the art decompiler with a high performance information management system in the middle. The information management system is screaming fast and implements many algorithms that analyze and transform the compiled VB6/ASP/COM to a form that is faithful to the original semantics of the source and also compatible with being re-authored as .NET. The decompiler (aka the Author) is programmable so the user can generate code that fits your standards.

The most important training that I see for a migration team is training themselves so they know what they are getting into, so they can make intelligent choices about how they want to code their app in .NET, and so they know how maintain and enhance their system after the migration. Tools cannot learn for you, this is something you have to do for yourself.

The standards point you brought up is also critical -- most organizations cannot even agree on standards internally so it is folly to expect the "standard" code produced by a tool right out of the box to be right for everyone. Different applications serve different needs and this drives different standards. These different standards need to be specified in a form the translator can use -- that is like "training the process" you mentioned above -- we actually call it tuning the translation process. Of course a translation tool has to be flexible and allow sophisticated user-defined migration rules to be "tunable".

When people tell me they just have to rewrite a huge legacy application, I like to present this analogy: lets say you had to do a massive data conversion: millions of records of data (some of it a little 'dirty' or maybe very 'dirty') in hundreds of tables being restructured and layed out into hundreds of different tables according to a new schema. What would you think if some consultant told you "just freeze the data for a few months and pay us to re-enter it." You would say no thanks. You would say use tools! But you would NOT just take the output of the first version of the conversion process and blow it into production right? You would test, tune, and refine, and test again until you were certain the process produced data that was complete and correct according to the new schema and business rules.

IMO, The sensible way to migrate very large VB6./COM apps to .NET is similar to the large data conversion. You need to test, tune and refine the conversion process before you "cut over" to the new code. With our tools, this "tuning" is done primarily by creating migration scripts and other refactoring rules rather than modifying the VB6/ASP code. We generate inspect, play with, rework, and learn from intermediate versions of the translations then put what we learn back into the tool configuration and retranslate it all again, and again, until we get .NET code that we like -- code we are confident we can finish to production and take forward after the migration. Clearly original redesign/rewriting work is part of this process even though you are using tools to help you reimplement your application.

There is more info relevant to this topic at http://www.greatmigrations.com
Dec 2 '09 #2
Frinavale
9,735 Expert Mod 8TB
Thank you very much for your reply Mjuras.

Our translator... transform(s) the compiled VB6/ASP/COM to a form that is faithful to the original semantics of the source and also compatible with being re-authored as .NET.
This sounds very interesting but our VB6 cod is not a clean design. Many layers of the application are merged into forms which should be in Objects. We have Objects but over time their functionality has spread into forms. The overall cleanliness of the system has slowly been undone as parts were quickly added or work-arounds for strange bugs were implemented. We will want to keep the main Objects but at the same time expand upon them to properly encapsulate the code for each component. From what I understand, VB6's design practices are a lot different than .NET and even though I don't have a lot of experience with VB6, it's painfully obvious that the VB6 design (of our project) needs revisiting.

The most important training that I see for a migration team is training themselves so they know what they are getting into, so they can make intelligent choices about how they want to code their app in .NET, and so they know how maintain and enhance their system after the migration.
I'm still not sure how the team can train for this. Is it just a matter of analyzing the design of the existing VB6 system to see what changes will have to be made for the system to operate in .NET? Or is there more too it?

Clearly original redesign/rewriting work is part of this process even though you are using tools to help you reimplement your application.
I've checked out your product and will keep it in mind for when we finally get to a migration stage. At this point we are still just researching the best approach to getting this job done efficiently and correctly.

Thanks again for your reply,

-Frinny
Dec 2 '09 #3
mjuras
3
IMO the best way to deal with improving code structure is to

1) develop a vision of what the better structure should be -- what do you want to change?

2) learn and use modern refactoring tools and methods to refactor the old code to the new design in a series of incremental steps using test-as-you-go techniques to be sure the system is changing in an orderly manner without breaking its functionality.

If you are moving from VB6 to .NET one of the fundamental aspects of your vision of a better structure will be a well-formed, correct codebase that builds and can be maintained on the .NET platform. Just a "straight port" from VB6 to .NET is actually a huge first step but it is often taken for granted and it is only a start. More interesting transformations ranging from cleanup, to API replacements, to moving things around the architecture layers, to a new object model, to something as radical as moving from desktop to web might be in order as well. Clearly code conversion tools are refactoring tools that can help you close the gap between where you are and where you want to be. The question becomes how to balance investing in making the tool do more during conversion or investing in making the team do more after conversion. The balance is based on weighing factors such as risk management, resources, and urgency.

As far as training for a migration to .NET, you have to build some systems in .NET. If you plan doing a lot of refactoring and on using tools to help you do it, you have to learn to use those tools.
Dec 2 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Zvika Glickman | last post by:
I'm migrating DB2 to ORACLE 9I. In the DB2 schema each table defined in diferrent tablespace. Few tablespaces are define on the same STOGROUP (there are few STOGROUP). It's a big db (few terra...
0
by: steve | last post by:
I am having huge problems migrating large db’s from one server to another. I use phpmyadmin to dump the data into a file, and then migrate it to my production server. Then I try to use this:...
4
by: Bernardo Robelo | last post by:
Hi, I am interested in migrating Microsoft Access database to Postgres database. But I do not have idea of like initiating. Maybe some tool exists for this problem. Thanks you. Bernardo
4
by: Juan | last post by:
I'm migrating a VB.Net app to c# and found the following: Private m_State(,) As Integer If anyone knows what is the analogous in c#... is it an array? Thanks, Juan.
6
by: Shai Levi | last post by:
Hi, I'm trying to migrate native c++ class to managed c++ class. The native class header definition looks as: class NativeClass { public: typedef void (CbFunc1)(int n,void* p);
3
by: BobRoyAce | last post by:
I would really appreciate recommendations for sources of materials on migrating ASP applications to ASP.NET (books, URL's, etc.). Also, is there a magazine that is particularly good for .NET stuff....
2
by: Jean-Claude Adams | last post by:
Hi Folks. I need some tutorial or some expertice about the subject. Because, i'm have a customer, need's change the actual appl, but the only issue is a dbf database, and the GUI is the older...
4
by: Collin Peters | last post by:
I have searched the Internet... but haven't found much relating to this. I am wondering on what the best practices are for migrating a developmemnt database to a release database. Here is the...
12
by: jdokos | last post by:
Does anyone know of any good sources (white papers, etc.) regarding migrating from Teradata to DB2 UDB EEE? We are in the very beginning stages of investigating this as an option for some of the...
34
by: subramanian100in | last post by:
Is there any difference between porting and migrating. Kindly explain
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.