开发者

tips and advices while migrating code from vb6 to .net with Visual studio 2010

开发者 https://www.devze.com 2022-12-29 09:19 出处:网络
I want to migrate one of the application开发者_如何学C from vb6 to .net with Visual studio 2010. At present the application is windows based application. I want to make web application.

I want to migrate one of the application开发者_如何学C from vb6 to .net with Visual studio 2010. At present the application is windows based application. I want to make web application. I guess I have to rewrite the code in .net. could you please advice me while I rewrite the code in .net.


If your VB6 application is composed of multiple COM objects with clean interfaces, then you should be able to reuse those components which do not touch the UI. You might want to take advantage of the VB6 expertise at your company to separate any UI code from business logic. The business logic can then be reused in the web application.


There's lots of advice on strategies for conversion. One strategy that might work well (as John said) is to use Interop to mix a VB6 back-end with a .Net web front end.

Some other resources:

  • Check out the other questions here tagged vb6-migration.
  • I highly recommend Microsoft's page about different conversion strategies.
  • Consider the commercial migration tools especially if you are short of developer time.
    • Artinsoft's upgrade companion (converts to c# and vb.net)
    • VBMigration partner (converts to vb.net)


It depends very highly on how well-structured the original application is. A well-structured application could be translated from desktop to web with a fairly high amount of reuse. Unfortunately, the vast majority of VB6-era code is not well-structured and that makes life much harder for you.

Visual Studio is able to import a VB6 project and convert it to VB.NET, but the mapping is not perfect. Coupled with the badly-structured code that I mentioned above that's common to a lot of VB6 code, you may be better off just totally scrapping the original project and starting anew.

It's highly dependent on a lot of factors, of course. You might be lucky and be working with one of those rare gems: a well-structured VB6 project with clear separation of views and code.

0

精彩评论

暂无评论...
验证码 换一张
取 消