Fog Creek Software
Discussion Board




Viability of using Visual Basic (classic)?

Hi all,

How highly would you guage the viability of using VB classic (i.e. not .Net) when developing new projects?

Obviously you need to take into account various factors such as:
1. expected lifetime of development and of the software itself.
2. existing skillbase - VB.Net is far enough removed from VB classic to consider it a new language. Why not jump for C# instead (as long as the developer is comfortable with both styles of syntax)?
3. The .NET runtime is not widespread among client machines although this would improve while the project is in development.
4. Will using VB classic leave you in a cul-de-sac in terms of future development or operation (a concern is Microsoft deliberately hobble the language's ability to operate on future OS)?

With these factors in mind, personally and professionally speaking (replies of both natures would be good), is it more prudent to disregard the language as a basis for new development or is there life in the old dog yet?

Anon
Wednesday, October 09, 2002

Ask yourself, can the problem you are trying to solve be solved effectively and efficiently with VB?

Or are there specific parts that can only be solved with additional tools that .Net provides?

If you answer the these questions with Yes and No respectively, you need to look at other aspect, some of which you yourself already identified.

It is then simply a cost versus benefit calculation.

A benefit of .Net might be the new challenge for your developer(s). Note that that does not help your customer at all, but it might be important if your choice for .Net is not disadvantageous for your customer.

A disadvantage of .Net might be the size of the runtime. That might go away - or rather, be swept under the carpet - in a couple of years, but today it might be important.

Anyway, there really is no right answer without considering the context. So try to get a clear picture of that before you decide.

Erik
Wednesday, October 09, 2002

Oh, and by the way, although there might not be much need for VB classic when newer, more productive and more appropriate tools arrive, at least it won't rust. So whatever you choose now, technically you'll be safe for a long time to come.

Erik
Wednesday, October 09, 2002

Picking the tool you know best is just as important as picking the best tool.

.Net is a huge change and it will take people months to learn it.  It's nice if you can include a project as part of that learning, but if schedule time is important then stick with VB6.

IanRae
Wednesday, October 09, 2002

You also need to consider the lifetime of the project.  Standard support to VB 6 ends in 2005.  Premium support ends in 2008.  If you expect the application to be in use for 5 or more years (without a total rewrite), I'd consider .Net.

We don't know that new versions of the OS won't work with the VB 6 runtime, but Microsoft hasn't promised that they will.

BTW, most likely the staff programmers (NOT consultants - they ought to have the skills already if they are billing you) would love to learn .Net.  A happy programmer is one who won't leave as soon as the job market picks up.  (And it always does.)

Eric Budd
Wednesday, October 09, 2002

It is all about code into dollars. If you have to learn to a new environment to create a product..it will take too long.

As far as long term, the issue in this regards is your skill set, and NOT THE FACT that the code will NOT run.

Today, with products like the latest Red Hat Linux, the basic desktop, Word processing, web browsing, and email stuff can be done *very* well with Linux, or  a windows desktop.

Looking at most business today, many could drop windows, and run Linux right now (schools are just starting). In fact, for my clients, the only thing that REALLY stops them from changing is the fact that they run MY software. In other words, the basic platform stuff like email, word processing, web browser, drawing (Corel draw) is available on either platform. The new Red hat GUI even looks like windows XP.

However, the code I have written only runs on windows. This means that if Microsoft beaks my code, or forces a re-write, there is no reason that I will use MS next time around. They very well know this, and thus I am betting that you VB code will run for the next 20 years.

In fact, MS is has been aware of this fact for the last 20 years. Companies like Apple have forced developers en-mass to throw out code SEVERAL TIMES!!.

None of the apple code from the mid 80’s (and in fact even much later) runs on newer Mac’s. They also just forced out a whole slew of code with their last OS “X” upgrade. This is unbelievable that Apple is still doing this. Those companies with apple software are again being presented a opportunity to migrate out of apple because of code re-writes that are being required!!

Every time you force developers to throw out code, it is a chance for the customer to CHANGE PLATFORMS. If I have to re-write a MS application, then I might as well use Linux...

Microsoft on the other hand knows this secret, and thus NEVER FORCES you to throw out code. I can still run old GW-basic code from 20 years ago on a brand new pc. You can still run old FoxPro code from 15 years ago on a new pc today (in fact, I know companies dosing this right now). You can also run windows 3.1 applications on a new box also.

In other words, what has stopped you from developing in 20 year old gw-basic? What has stopped you from running old windows 3.1 code? In fact, why did you ever upgrade? In fact, you can still develop with Visual basic 4 if you wish. If you want, you can use the 1992 version of ms-access (1.0) on a new pc today? Why did you ever start using anything new? Fact is, all the major applications for the last 20 years for Microsoft os still works today.

As you can see, one secret of MS’s success is that they NEVER force you to throw out old code. They have the best track record in the industry BY A COUTNRY MILE!.

With the Linux competition right now..it be a HUGE disaster to force developers to throw out old code. However, MS did not need Linux to come along and teach them this lesson. MS has been doing this to beat the brains out of the competition for the last 20 years.....

It is something the competitors to MS had better learn.

Even Apache right now is making this mistake, and has some compatibility problems between the new, and the old version...man, these people never learn....

So, yes..you can continue to use VB classic. It is just a question of who will hire you...not the fact that your code will not run!!!

Albert D. Kallal
Edmonton, Alberta Canada
Kallal@msn.com

Albert D. Kallal
Wednesday, October 09, 2002

I don't know enough about .Net, so I can't answer this question very well.  However, I'm wondering.

Is their a subset of VB classic that will translate well into VB.Net.  Stuff that the automatic updater can handle?

Perhaps the best approach is to identify that subset of VB6 and develop using that?

Ged Byrne
Thursday, October 10, 2002

"Microsoft on the other hand knows this secret, and thus NEVER FORCES you to throw out code....

....As you can see, one secret of MS’s success is that they NEVER force you to throw out old code. They have the best track record in the industry BY A COUTNRY MILE!."

Albert, you know this statement is not true.  Just because I can run a piece of GW-BASIC code that was written 20 years ago, doesn't mean Microsoft hasn't broken a lot of developer's source code over the years.

Charles Kiley
Thursday, October 10, 2002

"In fact, for my clients, the only thing that REALLY stops them from changing is the fact that they run MY software."

My company thinks about this when looking at any new software, if it only runs on Windows, it isn't being purchased.  Not that we have a lot against Windows, just lock in.

"They very well know this, and thus I am betting that you VB code will run for the next 20 years."

Maybe, but I think this could change as Microsoft transitions to a position as a service company.

"Even Apache right now is making this mistake, and has some compatibility problems between the new, and the old version...man, these people never learn...."

Very good point.
Yup, no php yet.  That is tantamount to Microsoft releasing IIS without asp capability.  It might have come about trying to design the best when good enough was adequate.  Apache is a platform, and they broke compatability, that is why it is being adopted so slowly.

CrazyTrain
Thursday, October 10, 2002

The basic answer to your question is yes.
Specifically, VB6 depends on COM and as long as there is support for COM there is support for VB6.

The best way to deal with the future of .NET with VB6 is design your project so that it makes liberal use of interfaces. Study VB.NET so you understand what is different and make sure that any area of your project that relies on a VB6 idiom is separated from your logic by an interface.

For example a data entry form have the form implement a interface. Then have a class called DataEntry that the frmDataEntry calls to process data. For example

IDataEntryForm
DataEntryClass
MyDataClass
=============
DataEntry Form
Implements IDataEntryForm

sub Form_Load
    Set DataEntry.MyDataForm = Me
end sub

sub txtName_Change
  DataEntry.UpdateEntry("Name")
end sub

private function IDataEntryForm_GetName() as string
    IDataEntryForm_GetName = txtName.Text 
end Function

private sub IDataEntryForm_GotoNextEntry()
    .....
end sub

==============
DataEntryClass
Public MyDataForm as IDataEntryForm

Sub UpdateEntry(source as string)
  If source = "Name" Then
      MyDataClass.Name = MyDataForm.GetName
      MyDataForm.GotoNextEntry
  End if
End Sub
==============

If you rigourously do this you will find that it is much easier to port you project to .NET when it is time to do so. In addition it is easier to port to other object oriented languages as well.

I recently completed a CAD/CAM conversion project from VB3.0 to VB6.0 using this principle and it will be considerably easier to go to .NET when my company chooses to do so.

I also recommend the reading of Design Patters by Gamma, Helms, Johnson, and Vlissades for good design techniques to use with this scheme. In addition Refactoring by Martin Fowler helps greatly when it turns out the initial design is inadequte or requirements change.

Rob Conley
Friday, October 11, 2002

*  Recent Topics

*  Fog Creek Home