Thursday, July 7, 2011

Introduction

 Page=1 & 2
WE HOPE THIS BOOK will be useful to experienced programmers of all languages,
but this introduction is primarily aimed at Visual Basic programmers. Other
programmers can jump to Chapter 2, to begin delving into an incredibly rich
integrated development environment (IDE) backed by the first modern fully
object-oriented language in the BASIC1 family. Programmers accustomed to
Visual Basic for Windows may need some convincing that all the work they face
in moving to VB .NET is worth it. Hence this chapter.
Visual Basic Then and Now
Visual Basic for Windows is a little over ten years old. It debuted on March 20, 1991,
at a show called “Windows World,” although its roots go back to a tool called Ruby
that Alan Cooper developed in 1988.2
There is no question that Visual Basic caused a stir. Our favorite quotes came
from Steve Gibson, who wrote in InfoWorld that Visual Basic was a “stunning new
miracle” and would “dramatically change the way people feel about and use
Microsoft Windows.” Charles Petzold, author of one of the standard books on
Windows programming in C, was quoted in the New York Times as saying: “For those
of us who make our living explaining the complexities of Windows programming to
programmers, Visual Basic poses a real threat to our livelihood.” (Petzold’s comments
are ironic, considering the millions of VB books sold since that fateful day
in 1991.) But another quote made at Visual Basic’s debut by Stewart Alsop is more
telling: Alsop described Visual Basic as “the perfect programming environment
for the 1990s.”
But we do not live in the 1990s anymore, so it should come as no surprise that
Visual Basic .NET is as different from Visual Basic for Windows as Visual Basic for
Windows Version 1 was from its predecessor QuickBasic. While we certainly feel
there is a lot of knowledge you can carry over from your Visual Basic for Windows
programming experience, there are as many changes in programming for the
1. Read BASIC as meaning “very readable-with no ugly braces.…”
2. Its code name, “Thunder,” appeared on one of the rarest T-shirts around—it says “Thunder
unlocks Windows” with a lightning bolt image. You may also see a cool screen saver that looks
like the shirt.
Chapter 1
2
.NET platform3 using Visual Basic.NET (or VB .NET for short) as there were in
moving from QuickBasic for DOS to VB1 for Windows.
The Versions of Visual Basic
The first two versions of Visual Basic for Windows were quite good for building
prototypes and demo applications—but not much else. Both versions tied excellent
IDEs with relatively easy languages to learn. The languages themselves had relatively
small feature sets. When VB 3 was released with a way to access databases
that required learning a new programming model, the first reaction of many
people was, “Oh great, they’ve messed up VB!” With the benefit of hindsight, the
database features added to VB3 were necessary for it to grow beyond the toy stage
into a serious tool. With VB4 came a limited ability to create objects and hence a
very limited form of object-oriented programming. With VB5 and VB6 came more
features from object-oriented programming, and it now had the ability to build
controls and to use interfaces. But the structure was getting pretty rickety since
the object-oriented features were bolted on to a substructure that lacked support
for it. For example, there was no way to guarantee that objects were created correctly
in VB—you had to use a convention instead of the constructor approach used by
practically every other object-oriented language. (See Chapter 4 for more on what
a constructor does.) Ultimately the designers of VB saw that, if they were going to
have a VB-ish tool for their new .NET platform, more changes were needed since,
for example, the .NET Framework depends on having full object orientation.
We feel that the hardest part of dealing with the various changes in VB over
the years is not so much in that the IDE changed a little or a lot, or that there were
a few new keywords to learn, the pain was in having to change the way that you
thought about your VB programs. In particular, to take full advantage of VB5 and
VB6, you had to begin to move from an object-based language with an extremely
limited ability to create your own objects to more of an object-oriented language
where, for example, interfaces was a vital part of the toolset. The trouble really
was that many VB programmers who grew up with the product had never programmed
using the principles of object-oriented programming before. When
classes were introduced in VB, most VB developers had no idea what a class really
was—never mind why they would ever want to use one.
Still, even with the limited object-oriented features available to you in VB5
and 6, when you learned how to use them they made programming large projects
easier. For example, you could build reusable objects like controls, or on a more
prosaic level, you could do neat things to help make maintaining your programs
easier. You could also banish the Select Case statement from maintenance hell.
3. Microsoft takes the word platform seriously. It even calls Windows a platform.

No comments:

Post a Comment

This is Good Computer Information Blog.they will give
best information about computer.