Valhalla Legends Forums Archive | Visual Basic Programming | Visual Basic .Net vs Visual Basic 6.0

AuthorMessageTime
DarkVirus
I'd like to create this thread ONLY for the discussion of the differences, likes and dislikes between Visual Basic .Net and Visual Basic 6.0. I don't want this thread to be a flaming contest to see who can bash VB the best because I'll just delete the posts. This is also not a thread to discuss why people should switch from Visual Basic 6.0 to C#.

So with that said, I encourage anyone who codes in this language to bring your opinions to the table.
November 8, 2003, 6:20 PM
Grok
I dislike how in VB.NET, you cannot declare a module-level variable, such as:

[code]Option Explicit

Dim LPOS As Long[/code]

But instead, you have to create a class at the appropriate scope level and make the variable visible.
November 9, 2003, 4:28 AM
Tuberload
Defeats the purpose of encapsulation.
November 9, 2003, 4:39 AM
Adron
[quote author=Tuberload link=board=31;threadid=3485;start=0#msg28242 date=1068352782]
Defeats the purpose of encapsulation.
[/quote]

Indeed it does. However, encapsulation isn't any good purpose in itself. Use the best methodology for each situation, whether it be encapsulation or global variables. A language shouldn't restrict your choice of methodology, unless it's a language designed to teach people to program in a certain way (think Pascal).
November 9, 2003, 12:48 PM
Grok
[quote author=Tuberload link=board=31;threadid=3485;start=0#msg28242 date=1068352782]
Defeats the purpose of encapsulation.
[/quote]

I don't see how. Maybe you mean something else. If I declared a module-level variable, then that variable is encapsulated by the module. Did you mean something else?

[code]' form Form1
Option Explicit

Public LPOS As Long[/code]

Now for a caller:
[code]'module basStart
Option Explicit

Private Sub Main()
Form1.Show
Form1.LPOS = 8
MsgBox "The value of LPOS on Form1 is = " & Form1.LPOS, vbExclamation
End Sub[/code]

It seems encapsulated to me.
November 9, 2003, 5:00 PM
St0rm.iD
Visual Basic .NET sucks vs VB6, but at the same time, is much better.

Pros:
- OOP
- Good standard library
- Good standard library
- Good standard library

Cons:
- Strict typing
- Overly verbose inheritance
- .NET VM is one slow mofo, but it actually doesn't consume that much RAM
- VB.NET is absolutely nothing like VB6.
- Not RAD (in my opinion)
- Can't port your code straight from VB6.

I'd rather use VB.NET, but it's just too slow on my POS computer (p3 550mhz).
November 9, 2003, 9:47 PM
Tuberload
[quote author=Grok link=board=31;threadid=3485;start=0#msg28295 date=1068397251]
[quote author=Tuberload link=board=31;threadid=3485;start=0#msg28242 date=1068352782]
Defeats the purpose of encapsulation.
[/quote]

I don't see how. Maybe you mean something else. If I declared a module-level variable, then that variable is encapsulated by the module. Did you mean something else?

[code]' form Form1
Option Explicit

Public LPOS As Long[/code]

Now for a caller:
[code]'module basStart
Option Explicit

Private Sub Main()
Form1.Show
Form1.LPOS = 8
MsgBox "The value of LPOS on Form1 is = " & Form1.LPOS, vbExclamation
End Sub[/code]

It seems encapsulated to me.
[/quote]

I meant, that by creating a class, and declaring the variables public defeats the purpose of encapsulation.

Adron: Yes you are right. OOP is my preferred programming methodology, so I guess I was stating my opinion.
November 9, 2003, 10:46 PM
Grok
I think you mean that making the variable public defeats data hiding. That's different from encapsulation.
November 10, 2003, 12:07 AM
Tuberload
I guess I am mixing practices and methodologies, thanks for pointing this out.
November 10, 2003, 12:19 AM
DarkVirus
[quote author=St0rm.iD link=board=31;threadid=3485;start=0#msg28341 date=1068414454]
Visual Basic .NET sucks vs VB6, but at the same time, is much better.

Pros:
- OOP
- Good standard library
- Good standard library
- Good standard library

Cons:
- Strict typing
- Overly verbose inheritance
- .NET VM is one slow mofo, but it actually doesn't consume that much RAM
- VB.NET is absolutely nothing like VB6.
- Not RAD (in my opinion)
- Can't port your code straight from VB6.

I'd rather use VB.NET, but it's just too slow on my POS computer (p3 550mhz).
[/quote]

How is it not RAD? VB.Net provides all of the older methods of Vb6.0 with a few exceptions. You are still able to to RAD but with a little stricter coding. And even then you don't HAVE to use the new methods provided with .Net because almost all of the old ones are still supported.

Also porting your old projects will obviously be harder because Microsoft is obviously hoping VB.net programmers will rely on the OOP structure of doing things. Thats just the impression a lot of people get, that its more object orientated so it MUST be bad. But I've yet to find any functions provided in VB6.0 that won't work in .Net except for a few. But those few are replaced by newer and better functions.

.Net provides (strict coding) mainly for the purpose of not being able to imply anything. So I would find it more beneficial to create an instanse of a form then simply opening it using Form1.Show.
November 10, 2003, 12:38 AM
Grok
I side with DV here regarding VB.NET being RAD. If VB6 can be defined as RAD, then VB.NET must be RAD++. So far in my usage of VB.NET, everything I've tried in VB.NET could be done quicker and prettier than with equivalent VB6.
November 10, 2003, 1:38 AM
DarkVirus
For those that give reasons as to why you don't like a specific language, please provide an actual explanation as to WHY you dislike it. Simply creating a list of the "topics" you dislike does the readers no good, because the thread is to be used as an educational tool (as is all our forums) for those either migrating over or for other reasons. I for one have found only one problem with VB.Net that I dislike and its really dumb actually. The only thing SO FAR I dislike about the new language is the fact that older versions of database coding isnt supported such as DAO,RDO or ADO. They can be used with modications, but to the point of giving up Id imagine, so do yourselves a favor if you enjoy coding databases and learn ADO.Net. 8)

With that as the exception, I've found nothing in VB.Net that I couldn't do in VB6 because I can switch between methods which is in my opinion, gives me a LOT more flexability than VB6 allowed.
November 10, 2003, 7:09 PM
St0rm.iD
I think weak typing is core to RAD. VB.NET is strongly typed, isn't it? I could be wrong on this one.
November 11, 2003, 7:24 PM
Grok
Is your definition of 'strongly typed' that of a language which supports very few, if any, implicit conversions?
November 11, 2003, 9:22 PM
DarkVirus
[quote author=St0rm.iD link=board=31;threadid=3485;start=0#msg28687 date=1068578691]
I think weak typing is core to RAD. VB.NET is strongly typed, isn't it? I could be wrong on this one.
[/quote]

Thats one thing that most people don't care for, which is the lack of implicit coding :) I find it annoying at first, but getting used to it becomes second nature for explicit coding, just as implicit coding was before.

Do you know what RAD really means? Not stands for because we all know what "RAD" stands for, but what MAKE VB a RAD language? If you don't know or your fuzzy then we'd be glad to define it for you :) Might clear up some confusion for others
November 11, 2003, 9:54 PM
St0rm.iD
Isn't RAD "officially" the way GUI's are design and code is integrated via the IDE?
November 11, 2003, 9:57 PM
Skywing
[quote author=St0rm.iD link=board=31;threadid=3485;start=0#msg28687 date=1068578691]
I think weak typing is core to RAD. VB.NET is strongly typed, isn't it? I could be wrong on this one.
[/quote]
I think strong typing is good for RAD, because it shows you many bugs at compile time instead of making you waste time in a debugger later to fix them.
November 11, 2003, 10:53 PM
St0rm.iD
I don't, IMO RAD is meant for prototyping mostly.
November 12, 2003, 2:36 AM
Grok
[quote author=St0rm.iD link=board=31;threadid=3485;start=15#msg28766 date=1068604567]
I don't, IMO RAD is meant for prototyping mostly.
[/quote]

RAD development platforms are the first choice of business for most applications that have limited distribution, limited lifetime, liberal performance constraints, and a narrow return on investment.

That is to say if it is not going to be used by hundreds, or for longer than 4x or 5x the time it takes to develop it; if performance is one of the weightiest design considerations, or if the cost of development outside RAD causes the payback to be nulled, then companies will first turn to RAD tools.
November 12, 2003, 5:58 AM

Search