[Last Call] Learn how to a build a cloud-first strategyRegister Now


Thinking of upgrading a sizable vb 6.0 application to VB.net

Posted on 2005-05-12
Medium Priority
Last Modified: 2010-05-01
Hi Experts,
I've been asked to look into the possibility of upgrading a large vb 6.0 application to vb.net.
My brother would prefer it to be accessible from the internet rather than installing it  as a client app on every client's PC.

The system is installed on client PCs and they can connect to a SQL server 2000 ( which is on a Windows 2003 server) remotely or via a LAN.
Can you give me some serious pointers as to how I would proceed.
Especially with regards to migating the vb 6.0 code, forms, module etc ( if possible) and what security aspects and server consideration I would have to consider.

Would this require a complete re-code ?
This would be a serious move and I need some expert advice

many thanks
Question by:jvize

Expert Comment

ID: 13990786
it is going to be a large undertaking that much i can assure you ;)
LVL 12

Expert Comment

ID: 13991027
Don't use the import wizard if you intend to work with the code later on - and I can almost guarantee that it will need some work. My experiences with the Wizard are basically: Look what it does and re-code manually. Parts of the code are unusable, parts will not work, parts will be not understandable and some parts may actually work well (unfortunately, this appears to be the exception rather than the rule).

I'd suggest to re-design from scratch. The object model in .NET is completely different, database and file access are different, the syntax is different, class modelling is partly different... - It's probably faster than trying to convert semi-automatically.

Security: Can't comment on that, but I'd assume you'd have to code security yourself. Most databases are rather weak in supporting security. But if your application has security today, you probably can just port this to the new version.

Server: Probably depends mostly on the database and the transactions you're planning to do. Since it's a DB application which probably accesses the server even today, requirements will not be that much different - add some 20% or 50% of RAM, CPU and disk space and you'll probably be fine.

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Author Comment

ID: 13991614
Christ a complete re-design.. :(
For a very good VB 6.0 programmer will this take much time ?
The VB 6.0 in this app had no class declaration ..it's pruely procedural ( sub, functions etc ) if you follow my drift.
My bother is hoping for an october relase of the new system.
I do have the entire summer to get this done.

I'm not after a hardware spec for the server implemenation..I want to know will it need a seperate web server to host the SQL Server 2000...or what ?..does the Windows 2003 server become obsolite ?
Security is screaming at me folks ..need input on this

Got some very good info so far.
I will add more points to this posted question, till I get what I need to proceed.

.So far, am I opening my eyes to new programming language ?  or a differnt approach ?

Is VB.Net that different to Vb 6.0 ..syntax wise ?
jesus it's a big appliaction :)  ( forgive the Irish  turn of phrase..not my fault ..I'm irish)
can I avoid class declaration stuff ? nad stick to procedures and function calls ?

LVL 12

Accepted Solution

fulscher earned 1000 total points
ID: 13993740
VB.Net is not just a next version of VB, it's a completely new programming language with a new programming paradigm. It just happens to carry the same name as VB (probably a marketing thing). From the point of view of effort, changing from VB to VB.Net is comparable to changing from VB 6 to C#.Net. VB.Net is nearer to Java than to VB.

Just a quick example (from http://www.asp101.com/articles/kaushal/aspnethelloworld/default.asp ): This is the code for a "hello world" program in VB.Net and ASP:

Public Class HelloWorld

    Inherits System.Web.UI.Page
    Protected WithEvents lblName As System.Web.UI.WebControls.Label
    Protected WithEvents btnSubmit As System.Web.UI.WebControls.Button
    Protected WithEvents txtName As System.Web.UI.WebControls.TextBox
    Protected WithEvents lblHello As System.Web.UI.WebControls.Label

    Public Sub btnSubmit_Click(ByVal sender As Object, ByVal e As
        txtName.Visible = False
        lblName.Visible = False
        btnSubmit.Visible = False
        lblHello.Text = "Hello World (by " + txtName.Text + ")"
        lblHello.Visible = True
    End Sub
    Protected Sub WebForm1_Load(ByVal Sender As System.Object, ByVal e
                                                   As System.EventArgs)
        ' Evals true first time browser hits the page
        If Not IsPostback Then
            lblHello.Visible = False
        End If
    End Sub
End Class

All clear? :-)

To find out more, check out this tutorial which explains some of the VB.Net concepts: http://www.programmersheaven.com/2/VB-NET-School .

Even a very experienced programmer will need a few weeks to become fluent in VB.net. If you've never worked with classes, add more weeks. If you need DB access, add again more weeks. Not coding, just learning.

Since you want to port the application to work on the Web, you really need to adhere to the .NET concepts, i.e. no more spaghetti code, but classes and objects (although you can create spaghetti classes, too). This also helps to avoid security issues. A big application probably will need some careful class and DB design, so add some weeks for this. If you've never done classes, add some weeks for learning about advanced class design. Also remember that DB access is completely (COMPLETELY!!) different.

Server: You could install IIS on the SQL Server, this shouldn't be a problem. IIS, ASP and SQL are well integrated. You don't need to replace the server.

All put together: I'd recommend to take yourself more time; the October deadline wan't be easy to meet if the application is really big (more than one or two dozend of forms or so). Remember that even if the application could be ported using the Wizard, you have to retest everything, because some of the assumptions of the languages are different: For example, in .NET, arrays are always zero-based (0...n-1) whereas in VB, they are always one-based (1...n). Just this feature will require rethinking bits of the code.

I personally would suggest to really re-think the application from scratch and re-design it in an object way. This could be a nice opportunity to add features the customers want and to remove old stuff you don't really need any more. Porting a complex application will require at least the same amount of work as recoding from scratch.  
LVL 12

Expert Comment

ID: 13995585
Thank you and good luck!

Expert Comment

ID: 13998542
Skip Vb.net and do it in C# I guarantee you that you will regret spending all that time converting to VB.Net only to see microsoft dump VB.Net in the next 2-3 years.  I am in a very similar situation to your brother and I opted to spend time making my VB6 Prg look like a .Net app by using things like VBSkinner and CoolXp rather than recode the whole thing. My app had almost no bugs and 5 years of field use, no way am I going back to dozens of daily calls and debugging all night.

Ask Yourself a Few Questions

Is this for cosmetic reasons? (If so you can get that without Migrating)

Is there something that I need to do in that I cant do in VB6 even with 3rd party addons

Am I willing to rewrite the code from scratch, that's what it wil take.

If you still want to go ahead, I really really recommend not using VB.Net dont get fooled by MS stop gap laungage.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question