VB6 -vs -vb2005 [英] VB6 -vs -vb2005

查看:92
本文介绍了VB6 -vs -vb2005的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前是经典vb6的用户,并在这些新闻组中闲逛。有些

你可能会意识到有一种非常反MS和vb2005的感觉。我已经试图让他们告诉我vb2005的哪些功能实际上比实际中的vb6更糟糕了,并且忘记了落后的哲学

兼容性片刻。


我现在想听到另一面。可能*曾经使用过的人

vb6 *(只有那些高兴;我觉得其他人无法进行

比较)告诉我,如果转向dotnet是一个好主意。抛开工作场所的

需求,将来打样等,并说明你是否后悔

移动,以及你回答的原因。

如果这是错误的组,请道歉。如果是,也许你会告诉我哪个
dotnet组是最好的。哦,对于初学者来说哪个是最好的,或者是'b $ b''转换''。非常感谢

I am presently a user of classic vb6 and hang out on those newsgroups. Some
of you may be aware that there is a very anti MS and vb2005 feeling there. I
have tried to get them to tell me which features of vb2005 are actually
worse then vb6 in practice, and forget the philosophy of backward
compatibility for a moment.

I would now like to hear "the other side". Could *anyone who previously used
vb6* (only those pleased; I feel the others will not be able to make the
comparison) tell me if the move to dotnet was a good idea. Leave aside the
needs of your workplace, future proofing etc. and say whether you regret the
move or not, and the reasons for your answer.

Apologies if this is the wrong group. If it is, perhaps you''ll tell me which
dotnet group is the best one. Oh, and which is the best one for beginners or
''converts''. Thanks v much

推荐答案

3月22日下午3:03,Aalaan < veryinva ... @ invalid.comwrote:
On Mar 22, 3:03 pm, "Aalaan" <veryinva...@invalid.comwrote:

我目前是经典vb6的用户,并在这些新闻组上闲逛。有些

你可能会意识到有一种非常反MS和vb2005的感觉。我已经试图让他们告诉我vb2005的哪些功能实际上比实际中的vb6更糟糕了,并且忘记了落后的哲学

兼容性片刻。


我现在想听到另一面。可能*曾经使用过的人

vb6 *(只有那些高兴;我觉得其他人无法进行

比较)告诉我,如果转向dotnet是一个好主意。抛开工作场所的

需求,将来打样等,并说明你是否后悔

移动,以及你回答的原因。

如果这是错误的组,请道歉。如果是,也许你会告诉我哪个
dotnet组是最好的。哦,对于初学者来说哪个是最好的,或者是'b $ b''转换''。非常感谢
I am presently a user of classic vb6 and hang out on those newsgroups. Some
of you may be aware that there is a very anti MS and vb2005 feeling there. I
have tried to get them to tell me which features of vb2005 are actually
worse then vb6 in practice, and forget the philosophy of backward
compatibility for a moment.

I would now like to hear "the other side". Could *anyone who previously used
vb6* (only those pleased; I feel the others will not be able to make the
comparison) tell me if the move to dotnet was a good idea. Leave aside the
needs of your workplace, future proofing etc. and say whether you regret the
move or not, and the reasons for your answer.

Apologies if this is the wrong group. If it is, perhaps you''ll tell me which
dotnet group is the best one. Oh, and which is the best one for beginners or
''converts''. Thanks v much



嗨Aalaan,


我开始使用Visual Basic 1.0版。从那以后,我已经使用了每个版本

。我看它从最基本的版本开始,这是非常*基本的,但是你可以在没有MDI支持的情况下编写非常基本的Windows

应用程序到版本6.0,你可以在哪里
编写ActiveX组件,COM DLL和完整的Windows

应用程序。我看了整个历史。我就是为了这一切。


我以极大的热情接近了.NET - 还有很多行李。

有些东西我想要的能够在VB6中做到我只是简单地说是
无法做到。*或者,如果我想这样做,那么我需要写的代码量是多少?是巨大的,我不得不调用不起眼的API函数

,如果我不是很小心,我的程序崩溃了(或者,在最坏的情况下,b $ b情况下,用户的机器。


起初,转向.NET很困难。我不得不忘记很多东西。但从长远来看,事实证明这是一项有价值的投资。

我从此没有回头。这些天来,我不愿意使用VB6

代码,并且害怕维护我们遗留的VB6代码。我宁愿将b $ b移植到.NET上,因为.NET代码更稳定,更容易记录,

更安全。 br />

VB6有一些事情要做:


- 这是一个很棒的原型平台。你可以用一个b $ $ $ $ $ $ $ $ j j j j j j j问题是,太多的原型变成了生产软件。我不会从我的屁股中鞭打出来。我看着它发生了,

一次又一次。 我们将在VB中执行UI原型。接下来你要知道,原型是什么?是申请。 (直到今天,我拒绝使用开发软件来准备UI原型。我在

Visio中进行。)


- 这是一个很好的实验工具。如果你想弄清楚

如何做某事,或者某些事情是否可行,如果不需要建立一个完整的框架,你可以在VB6中进行几分钟,并确定其可行性。有时,在.NET中要做的事情要困难得多(尽管并非总是这样)。并且仍有

经典VB应用程序倾向于成为生产的问题

应用程序。


- 当你需要时要忽略变量的数据类型,你可以。

抛开所有宗教论点,Variant在它产生时起到了不连续的b $ b目的的作用。它是COM的内在组成部分,并且创建了
COM来解决某些问题。有一段时间,

COM很好地解决了这些问题。不幸的是,COM的'b $ b b效率是短暂的; DLL地狱毁了它。 COM的问题,然而,
是导致.NET中许多设计决定的关键问题之一。


- 它有太多可用的第三方组件。

并不意味着它们都值得你付出的代价,但是你可以找到你想要的东西的机会非常高。如果

你找不到一个,并且你有时间,你可以用一点时间和仔细的编码来推动你自己的

控制。


其他人会对那些使经典VB成为优秀平台的东西有所了解。这样的事实就是它很容易学习,它很普遍,它很实惠,你可以在任何地方找到关于它的书籍

,语言是建立的进入Office套件,等等。
on。但即便如此,还有一些相当严重的问题:


- Classic Visual Basic从来都不是真正的类型安全语言。类型 -

安全性是编写安全代码的关键部分。它确保我的

代码不会写入其他人的记忆。 .NET狂热关于

类型的安全性。


- 和Variant一样有用,有时很难调试,

因为它往往被滥用。它的滥用并不总是故意的。

许多开发人员都是自学成才;他们并不理解Option Strict的重要性,这对语言来说是一个相对较晚的补充。因此,许多变量的默认数据类型

是Variant。这意味着许多变量默认变为变量,并且它们的数据类型会随着软件的运行而自发地发生变化。众所周知,这些类型的缺陷很难调试。


- 经典VB从来都不是真正面向对象的。它支持

*对象的概念 - 以及COM的对象概念 - 但是它

不支持实现继承,多态性,超载,

或压倒一切。你必须通过委托来完成所有这些工作。

这创建了大量的代码库,其中大量的代码只需将函数调用转发给其他函数。 VB的对象并没有支持构造函数。


- VB中的错误处理系统总是(我个人认为)

最好的kludgy。您可以使用On Error Resume Next或On Error

GoTo。并且尝试嵌套错误处理程序很快就变得混乱了。

的任何人都不知道如何正确处理错误是为了整个世界

受伤。


所以随之而来的是VB.NET。我还没有遇到任何我可以在经典VB中做的事情,我不能在VB.NET中做。此外,我的代码更多

安全是因为它是类型安全的;我不再需要手动编写Win32 API来调用

了;结构化异常处理在经典VB中的错误处理方面远远优于

;我完全支持所有

OOP原则,包括具有可重载构造函数的对象;并且

我仍​​然有一个新兴的第三方组件供应,我的处置是




当天,VB6是一个很棒的平台,我喜欢它。我发誓。

我可以写任何我需要做的事情。但更大的和更好的事情已经出现了。我没有后悔搬到.NET。


我希望我已经回答了你的问题。

Hi Aalaan,

I started using Visual Basic with version 1.0. I''ve used every version
since then. I watched it go from its most basic version, which was
*extremely* rudimentary but enabled you to write very basic Windows
applications with no MDI support, to version 6.0, where you could
write ActiveX components, COM DLLs, and full-fledged Windows
applications. I watched the whole history. I was there for it all.

I approached .NET with a lot of enthusiasm--and a lot of baggage.
There were things that I wanted to be able to do in VB6 that I *simply
could not do.* Or, if I wanted to do them, the amount of code that I
had to write was enormous, and I had to invoke obscure API functions
which, if I was not very careful, crashed my program (or, in the worst
case scenario, the user''s machine.

At first, moving to .NET was difficult. I had to unlearn a lot of
things. But in the long run, it proved to be a worthwhile investment.
I haven''t looked back since. These days, I''m loathe to work with VB6
code, and dread having to maintain our legacy VB6 code. I''d rather
port it .NET because the .NET code is more stable, easier to document,
and more secure.

There were a few things that VB6 had going for it:

- It was a great prototyping platform. You could whip things up in a
jiffy. The problem was, too many prototypes became production
software. I''m not whipping that out of my butt. I watched it happen,
time and again. "We''ll just do the UI prototype in VB." Next thing you
know, the "prototype" is the application. (To this day, I refuse to
use development software to prepare UI prototypes. I do them in
Visio.)

- It was a great tool for experimentation. If you wanted to figure out
how to do something, or whether or not something was feasible, without
having to build a full framework, you could do it in VB6 in a few
minutes, and determine its feasibility. Sometimes, that''s a lot harder
to do in .NET (though that''s not always the case). And there''s still
that problem that classic VB applications tend to become production
applications.

- When you NEEDED to ignore the data type of a variable, you could.
All the religous arguments aside, the Variant served a discrete
purpose when it came into being. It was an intrinsic part of COM, and
COM was created to solve a certain set of problems. And for a while,
COM solved those problems very well. Unfortunately, COM''s
effectiveness was short-lived; DLL Hell ruined it. COM''s problems,
however, are one of the key issues that led to many of the design
decisions in .NET.

- There was a plethora of available 3rd party components for it. That
doesn''t mean they were all worth what you paid for, but the chances
were very high that you could find what you were looking for. And if
you couldn''t find one, and you had the time, you could roll your own
control with a little time and careful coding.

Others will have their opinions about things that made classic VB a
great platform. Things like the fact that it was so easy to learn, it
was pervasive, it was affordable, you could find books about it just
about anywhere, the language was built into the Office suite, and so
on. But even with all of that, there were some fairly serious
drawbacks to it:

- Classic Visual Basic was never a truly type-safe language. Type-
safety is a critical part of writing secure code. It ensures that my
code doesn''t write over someone else''s memory. .NET is fanatical about
type safety.

- As useful as the Variant was, it was sometimes difficult to debug,
because it tended to be overused. Its abuse wasn''t always intentional.
A lot of developers were self-taught; they didn''t understand the
importance of Option Strict, which was a relatively late addition to
the language. Consequently, the default data type for many variables
was a Variant. This meant that many variables became Variants by
default and their data types were subject to spontaneous changes as
the software ran. These types of defects are notoriously difficult to
debug.

- Classic VB was never truly object oriented. It supported the
*notion* of objects--and COM''s notion of objects, at that--but it
didn''t support implementation inheritance, polymorphism, overloading,
or overriding. You had to do all of that yourself through delegation.
This created massive code libraries where reams of code simply
forwarded function calls to other functions. And VB''s objects didn''t
support constructors.

- The error handling system in VB was always (in my personal opinion)
kludgy at best. You could either use On Error Resume Next or On Error
GoTo. And trying to nest error handlers quickly got messy. Anyone who
didn''t know how to properly handle errors was in for a whole world of
hurt.

So, along comes VB.NET. I have yet to run into anything that I could
do in classic VB that I can''t to in VB.NET. Further, my code is more
secure is because it''s type-safe; I don''t have to hand-code calls to
the Win32 API anymore; structured exception handling is far superior
to the error handling in classic VB; I get full support for all of the
OOP principles, including objects with overloadable constructors; and
I still have a burgeoning supply of available 3rd party components at
my disposal.

In it''s day, VB6 was a great platform, and I loved it. I swore by it.
I could write just about anything I needed to do in it. But bigger and
better things have come along. I haven''t regretted the move to .NET.

I hope I have answered your question.


我相信这将成为一个非常长的主题(因为这个问题总是引起争论)。以下是我的想法:


我已经使用过每个版本的Visual Basic(从BASIC开始),最多是

并包括VB.NET 2005 VB的历史确实在VB 6.0和之后的所有内容之间画了一条线。


坦率地说,我希望MS改变VB.NET''当.NET

问世时,我的名字变得与众不同,因为表面上VB.NET和VB 6.0看起来相似,但它们几乎在每一个方面都是完全不同的。计数。


换句话说,今天的VB.NET和过去的VB 6.0是如此的不同(恕我直言),试着说哪个更好是一个笑话因为你比较苹果和大猩猩。


毫无疑问,VB.NET比VB 6.0更好。以下是几个原因:
原因:


内存管理(.NET Framework)

从代码中分离应用程序管理。

面向对象

更多成熟语言功能如短路和短手

运营商。

结构化异常处理

IDE


我真的想不出有关VB 6.0的更好/更好的事情。


" Aalaan" < ve ********* @ invalid.comwrote in message

news:46 ******** @ dnews.tpgi.com.au ...
I''m sure this will become an extremely long thread (as this question always
provokes high debate). Here are my thoughts:

I''ve used every version of Visual Basic (starting with just BASIC), up to
and including VB.NET 2005 and the history of VB really has a line drawn
between VB 6.0 and everything that came after.

Frankly, I wish MS changed VB.NET''s name to something different when .NET
came out because, while on the surface VB.NET and VB 6.0 look similar, they
are radically different in almost every way that counts.

In other words, the VB.NET of today and the VB 6.0 of days past are so
different (IMHO) that to try to say which is better is a joke because you
are comparing apples and gorillas.

There is no quesiton that VB.NET is better than VB 6.0. Here are just a few
reasons:

Memory Management (.NET Framework)
Separation of application managment from code.
Object-Oriented
More "mature" language features like short-circuiting and short-hand
operators.
Stuctured Exception Handling
The IDE

I really can''t think of one thing that is/was better about VB 6.0.

"Aalaan" <ve*********@invalid.comwrote in message
news:46********@dnews.tpgi.com.au...

>我目前是经典vb6的用户,并在这些新闻组中闲逛。有些人可能会意识到那里有一种非常反MS和vb2005的感觉。
我试图让他们告诉我vb2005的哪些功能实际上比实际中的vb6更差,暂时忘记了落后兼容的理念。


我现在想听到另一面。 *以前

的任何人都可以使用vb6 *(只有那些人高兴;我觉得其他人无法做出比较的b / b
)告诉我是否转向dotnet是一个好主意。抛开

你工作场所的需求,未来的打样等等,并说出你是否b $ b b b遗憾的行动,以及你回答的原因。

如果这是错误的组,请道歉。如果是的话,也许你会告诉我

哪个dotnet组是最好的。哦,这对于初学者或转换者来说是最好的。非常感谢
>I am presently a user of classic vb6 and hang out on those newsgroups. Some
of you may be aware that there is a very anti MS and vb2005 feeling there.
I have tried to get them to tell me which features of vb2005 are actually
worse then vb6 in practice, and forget the philosophy of backward
compatibility for a moment.

I would now like to hear "the other side". Could *anyone who previously
used vb6* (only those pleased; I feel the others will not be able to make
the comparison) tell me if the move to dotnet was a good idea. Leave aside
the needs of your workplace, future proofing etc. and say whether you
regret the move or not, and the reasons for your answer.

Apologies if this is the wrong group. If it is, perhaps you''ll tell me
which dotnet group is the best one. Oh, and which is the best one for
beginners or ''converts''. Thanks v much



我的天哪Mike!我几乎无法要求更全面的答案。实际上,给我的

消息可能不是你想要的!我确实想要快速地运行一些东西

并且使用一种*相对简单的语言和

直观的学习(虽然在650小时后它我不会'' t称之为

easy)。我不认为我会写任何大型企业应用程序。一个小型企业的会计系统是我的巅峰时期,我现在很好用vb6

,现金和现金使用的GST零件。但是,

你知道,经典的vb群体对网络和微软的感觉是如此强烈以至于我觉得我必须听到另一面。你的答案非常充实

答案对我有很大的帮助。谢谢。


" Mike Hofer" < kc ******** @ gmail.com写信息

新闻:11 ********************** @ n59g2000hsh.googlegr oups.com ...
My goodness Mike! I could hardly ask for a fuller answer. Actually, the
message to me is probably not what you intended! I do want to run up things
reasonably quickly and have a language that is *relatively* easy and
intuitive to learn (though after 650 hours at it I wouldn''t call it exactly
easy). I don''t think I''ll be writing any big corporate apps. An accounting
system for small business is about my peak and I''m well into that with vb6
now, having got the cashbook and GST parts polished and in live use. But,
you know, the feeling in the classic vb groups against dotnet and Microsoft
is so strong that I felt I had to hear "the other side". Your very full
answer has helped me enormously. Thanks.

"Mike Hofer" <kc********@gmail.comwrote in message
news:11**********************@n59g2000hsh.googlegr oups.com...

3月22日下午3:03,Aalaan < veryinva ... @ invalid.comwrote:
On Mar 22, 3:03 pm, "Aalaan" <veryinva...@invalid.comwrote:

>我现在是经典vb6的用户并在这些新闻组上闲逛。
一些<你可能会意识到那里有一种非常反MS和vb2005的感觉。我试图让他们告诉我vb2005的哪些功能实际上比实际中的vb6差,并且暂时忘记了后向兼容的理念。
vb6 *的任何人(只有那些高兴;我觉得其他人无法进行比较)告诉我是否转向dotnet是一个好主意。暂且不谈
工作场所的需求,未来的打样等,并说出你是否后悔
移动与否,以及你回答的原因。 <如果这是错误的群体,请道歉。如果是的话,也许你会告诉我
哪个dotnet小组是最好的。哦,哪个是初学者最好的一个

''转换''。非常感谢
>I am presently a user of classic vb6 and hang out on those newsgroups.
Some
of you may be aware that there is a very anti MS and vb2005 feeling
there. I
have tried to get them to tell me which features of vb2005 are actually
worse then vb6 in practice, and forget the philosophy of backward
compatibility for a moment.

I would now like to hear "the other side". Could *anyone who previously
used
vb6* (only those pleased; I feel the others will not be able to make the
comparison) tell me if the move to dotnet was a good idea. Leave aside
the
needs of your workplace, future proofing etc. and say whether you regret
the
move or not, and the reasons for your answer.

Apologies if this is the wrong group. If it is, perhaps you''ll tell me
which
dotnet group is the best one. Oh, and which is the best one for beginners
or
''converts''. Thanks v much



嗨Aalaan,

我开始使用1.0版的Visual Basic。从那以后,我已经使用了每个版本

。我看它从最基本的版本开始,这是非常*基本的,但是你可以在没有MDI支持的情况下编写非常基本的Windows

应用程序到版本6.0,你可以在哪里
编写ActiveX组件,COM DLL和完整的Windows

应用程序。我看了整个历史。我就是为了这一切。


我以极大的热情接近了.NET - 还有很多行李。

有些东西我想要的能够在VB6中做到我只是简单地说是
无法做到。*或者,如果我想这样做,那么我需要写的代码量是多少?是巨大的,我不得不调用不起眼的API函数

,如果我不是很小心,我的程序崩溃了(或者,在最坏的情况下,b $ b情况下,用户的机器。


起初,转向.NET很困难。我不得不忘记很多东西。但从长远来看,事实证明这是一项有价值的投资。

我从此没有回头。这些天来,我不愿意使用VB6

代码,并且害怕维护我们遗留的VB6代码。我宁愿将b $ b移植到.NET上,因为.NET代码更稳定,更容易记录,

更安全。 br />

VB6有一些事情要做:


- 这是一个很棒的原型平台。你可以用一个b $ $ $ $ $ $ $ $ j j j j j j j问题是,太多的原型变成了生产软件。我不会从我的屁股中鞭打出来。我看着它发生了,

一次又一次。 我们将在VB中执行UI原型。接下来你要知道,原型是什么?是申请。 (直到今天,我拒绝使用开发软件来准备UI原型。我在

Visio中进行。)


- 这是一个很好的实验工具。如果你想弄清楚

如何做某事,或者某些事情是否可行,如果不需要建立一个完整的框架,你可以在VB6中进行几分钟,并确定其可行性。有时,在.NET中要做的事情要困难得多(尽管并非总是这样)。并且仍有

经典VB应用程序倾向于成为生产的问题

应用程序。


- 当你需要时要忽略变量的数据类型,你可以。

抛开所有宗教论点,Variant在它产生时起到了不连续的b $ b目的的作用。它是COM的内在组成部分,并且创建了
COM来解决某些问题。有一段时间,

COM很好地解决了这些问题。不幸的是,COM的'b $ b b效率是短暂的; DLL地狱毁了它。 COM的问题,然而,
是导致.NET中许多设计决定的关键问题之一。


- 它有太多可用的第三方组件。

并不意味着它们都值得你付出的代价,但是你可以找到你想要的东西的机会非常高。如果

你找不到一个,并且你有时间,你可以用一点时间和仔细的编码来推动你自己的

控制。


其他人会对那些使经典VB成为优秀平台的东西有所了解。这样的事实就是它很容易学习,它很普遍,它很实惠,你可以在任何地方找到关于它的书籍

,语言是建立的进入Office套件,等等。
on。但即便如此,还有一些相当严重的问题:


- Classic Visual Basic从来都不是真正的类型安全语言。类型 -

安全性是编写安全代码的关键部分。它确保我的

代码不会写入其他人的记忆。 .NET狂热关于

类型的安全性。


- 和Variant一样有用,有时很难调试,

因为它往往被滥用。它的滥用并不总是故意的。

许多开发人员都是自学成才;他们并不理解Option Strict的重要性,这对语言来说是一个相对较晚的补充。因此,许多变量的默认数据类型

是Variant。这意味着许多变量默认变为变量,并且它们的数据类型会随着软件的运行而自发地发生变化。众所周知,这些类型的缺陷很难调试。


- 经典VB从来都不是真正面向对象的。它支持

*对象的概念 - 以及COM的对象概念 - 但是它

不支持实现继承,多态性,超载,

或压倒一切。你必须通过委托来完成所有这些工作。

这创建了大量的代码库,其中大量的代码只需将函数调用转发给其他函数。 VB的对象并没有支持构造函数。


- VB中的错误处理系统总是(我个人认为)

最好的kludgy。您可以使用On Error Resume Next或On Error

GoTo。并且尝试嵌套错误处理程序很快就变得混乱了。

的任何人都不知道如何正确处理错误是为了整个世界

受伤。


所以随之而来的是VB.NET。我还没有遇到任何我可以在经典VB中做的事情,我不能在VB.NET中做。此外,我的代码更多

安全是因为它是类型安全的;我不再需要手动编写Win32 API来调用

了;结构化异常处理在经典VB中的错误处理方面远远优于

;我完全支持所有

OOP原则,包括具有可重载构造函数的对象;并且

我仍​​然有一个新兴的第三方组件供应,我的处置是




当天,VB6是一个很棒的平台,我喜欢它。我发誓。

我可以写任何我需要做的事情。但更大的和更好的事情已经出现了。我没有后悔搬到.NET。


我希望我已经回答了你的问题。


Hi Aalaan,

I started using Visual Basic with version 1.0. I''ve used every version
since then. I watched it go from its most basic version, which was
*extremely* rudimentary but enabled you to write very basic Windows
applications with no MDI support, to version 6.0, where you could
write ActiveX components, COM DLLs, and full-fledged Windows
applications. I watched the whole history. I was there for it all.

I approached .NET with a lot of enthusiasm--and a lot of baggage.
There were things that I wanted to be able to do in VB6 that I *simply
could not do.* Or, if I wanted to do them, the amount of code that I
had to write was enormous, and I had to invoke obscure API functions
which, if I was not very careful, crashed my program (or, in the worst
case scenario, the user''s machine.

At first, moving to .NET was difficult. I had to unlearn a lot of
things. But in the long run, it proved to be a worthwhile investment.
I haven''t looked back since. These days, I''m loathe to work with VB6
code, and dread having to maintain our legacy VB6 code. I''d rather
port it .NET because the .NET code is more stable, easier to document,
and more secure.

There were a few things that VB6 had going for it:

- It was a great prototyping platform. You could whip things up in a
jiffy. The problem was, too many prototypes became production
software. I''m not whipping that out of my butt. I watched it happen,
time and again. "We''ll just do the UI prototype in VB." Next thing you
know, the "prototype" is the application. (To this day, I refuse to
use development software to prepare UI prototypes. I do them in
Visio.)

- It was a great tool for experimentation. If you wanted to figure out
how to do something, or whether or not something was feasible, without
having to build a full framework, you could do it in VB6 in a few
minutes, and determine its feasibility. Sometimes, that''s a lot harder
to do in .NET (though that''s not always the case). And there''s still
that problem that classic VB applications tend to become production
applications.

- When you NEEDED to ignore the data type of a variable, you could.
All the religous arguments aside, the Variant served a discrete
purpose when it came into being. It was an intrinsic part of COM, and
COM was created to solve a certain set of problems. And for a while,
COM solved those problems very well. Unfortunately, COM''s
effectiveness was short-lived; DLL Hell ruined it. COM''s problems,
however, are one of the key issues that led to many of the design
decisions in .NET.

- There was a plethora of available 3rd party components for it. That
doesn''t mean they were all worth what you paid for, but the chances
were very high that you could find what you were looking for. And if
you couldn''t find one, and you had the time, you could roll your own
control with a little time and careful coding.

Others will have their opinions about things that made classic VB a
great platform. Things like the fact that it was so easy to learn, it
was pervasive, it was affordable, you could find books about it just
about anywhere, the language was built into the Office suite, and so
on. But even with all of that, there were some fairly serious
drawbacks to it:

- Classic Visual Basic was never a truly type-safe language. Type-
safety is a critical part of writing secure code. It ensures that my
code doesn''t write over someone else''s memory. .NET is fanatical about
type safety.

- As useful as the Variant was, it was sometimes difficult to debug,
because it tended to be overused. Its abuse wasn''t always intentional.
A lot of developers were self-taught; they didn''t understand the
importance of Option Strict, which was a relatively late addition to
the language. Consequently, the default data type for many variables
was a Variant. This meant that many variables became Variants by
default and their data types were subject to spontaneous changes as
the software ran. These types of defects are notoriously difficult to
debug.

- Classic VB was never truly object oriented. It supported the
*notion* of objects--and COM''s notion of objects, at that--but it
didn''t support implementation inheritance, polymorphism, overloading,
or overriding. You had to do all of that yourself through delegation.
This created massive code libraries where reams of code simply
forwarded function calls to other functions. And VB''s objects didn''t
support constructors.

- The error handling system in VB was always (in my personal opinion)
kludgy at best. You could either use On Error Resume Next or On Error
GoTo. And trying to nest error handlers quickly got messy. Anyone who
didn''t know how to properly handle errors was in for a whole world of
hurt.

So, along comes VB.NET. I have yet to run into anything that I could
do in classic VB that I can''t to in VB.NET. Further, my code is more
secure is because it''s type-safe; I don''t have to hand-code calls to
the Win32 API anymore; structured exception handling is far superior
to the error handling in classic VB; I get full support for all of the
OOP principles, including objects with overloadable constructors; and
I still have a burgeoning supply of available 3rd party components at
my disposal.

In it''s day, VB6 was a great platform, and I loved it. I swore by it.
I could write just about anything I needed to do in it. But bigger and
better things have come along. I haven''t regretted the move to .NET.

I hope I have answered your question.



这篇关于VB6 -vs -vb2005的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆