|
Visual Basic (VB) is an event driven programming language derived from BASIC. VB enables Rapid
Application Development (RAD) of graphical user
interface (GUI) applications; allows easy access to databases using DAO, RDO, or ADO; and makes it easy to create ActiveX controls. A moderately skilled programmer can quickly put together a simple business application
using components provided with Visual Basic.
Many derivative languages also exist:
Language features
VB was designed to be usable by all programmers, whether novice or expert.
It is garbage collected, has a large
library of utility objects, and has primitive object oriented support. Unlike many other programming languages, VB is not case sensitive.
Visual Basic spawned the first commercially viable reusable component market. There are thousands of 3rd party components available today from hundreds of vendors.
Visual Basic makes it easy to build, deploy, use, and reuse components.
Criticisms of Visual Basic
VB is criticized for
- Not portable. It is only available for Microsoft Windows, although a
DOS version was marketed at one time.
- To big. Visual Studio is distributed on several discs, and executables require a 1.4MB runtime library.
- Not fully object oriented. Many common
object oriented features are not present in Visual Basic. Visual Basic.NET
- Poor mathematical performance.
- Bugs in the IDE. This is fixed to some extent by a series of service packs from Microsoft.
- relying more heavily on hand coding than other visually-oriented tools, (e.g. some Java-based tools)
- A visually inelegant syntax. (e.g. requiring special line terminator syntax to allow statements to span more than one
line)
- Syntax unrelated to the C-like syntax in most other
languages in popular use (e.g. Java, ECMAScript/JavaScript, C#, PHP, Perl,
C++, C). This criticism is often applied to many other BASIC-like languages.
- Arrays have a base index of 1, unlike almost all programming languages which have a
base index of 0.
- No threading support.
- Inelegant error handling. Errors are handled by an "On Error Goto line#" statement. VB.NET introduced
Try-Catch-Finally blocks.
The language continues to attract much criticism but also continues to cater to a large base of users and developers. Some of
these criticisms have been addressed in later versions of VB, particularly by VB.NET.
Unfortunately, beginning in VB.NET many reforms to the language made it backwards incompatible with earlier versions of Visual
Basic. Microsoft provides a wizard to help Visual Basic programmers revise their programs to support VB.NET, but many features
are not converted correctly.
Advantages of Visual Basic
VB is praised for
- Optimized for a single platform.
- Large enough to contain functions for all common tasks. The programmer does not need to search around for hundreds of third
party libraries.
- Being just object oriented enough and no
more. (Unfortunately this advantage has been lost in VB.NET)
- Performing well at mathematical tasks. (When the application written in VB does not include very complex algorithms of a
scientific nature).
- Being easy to understand when using out-of-process services
- Rarely crashing for no clear reason, owing to comprehensive and comprehensible error messages
- Being more visually-based than other products (e.g. some C++-based
tools), requiring less hand coding
- Having a visually clear syntax (e.g. requiring special line terminator syntax to allow statements to span more than one line
and thus limiting syntax errors to the line in which they occur.)
- Having syntax unrelated to the esoteric C-like
syntax used by many other popular languages (e.g. Java, ECMAScript/JavaScript,
C#, PHP, Perl, C++, C) -- this is a general advantage of BASIC-like languages.
Some of these advantages have been lost in later versions of VB, particularly in VB.NET, and in doing so backwards compatibility has been sacrificed. However the language continues to attract much
praise; it also continues to cater to a large base of users and developers.
Evolution of Visual Basic
VB 1.0 was introduced in 1991. The approach for connecting the programming language to
the graphical user interface is derived from a system called Tripod, originally developed by Alan Cooper, which was further developed by Cooper and his associates under contract to Microsoft.
During the Internet boom programmers were in great demand and many new programmers
entered the field. These new programmers helped make VBScript one of the most common languages for web-based scripting on the
Microsoft platform.
Recently, the use of VBScript has largely been superseded; in the browser it has almost completely been displaced by
JavaScript and on the server by PHP, Java and .NET.
Timeline
- Visual Basic 1.0 (May 1991) was released for Windows.
- Visual Basic 1.0 for MS-DOS was released in (September 1992). The language itself was not quite compatible with Visual Basic for Windows, as it was actually the next version
of Microsoft's DOS-based BASIC compilers, QuickBASIC and BASIC Professional Development System. The interface was barely graphical,
using extended ASCII characters to simulate the appearance of a GUI.
- Visual Basic 2.0 was released in November 1992. The programming environment was easier
to use, and its speed was improved.
- Visual Basic 3.0 was released in the summer of 1993) and came in Standard and
Professional versions.
- Visual Basic 4.0 (August 1995) was the first that could create 32-bit as well as 16-bit Windows programs.
- With version 5.0 (February 1997), Microsoft released Visual Basic exclusively for
32-bit versions of Windows. Programmers who preferred to write 16-bit programs were
pleased to find that Visual Basic 5.0 was able to import programs written in Visual Basic 4.0, and it was not difficult to
convert Visual Basic 5.0 programs to be compatible with Visual Basic 4.0.
- Visual Basic 6.0 (Summer 1998) improved in a number of areas, including the ability to
create web-based applications. VB6 will enter Microsoft's "non-supported phase" starting March 2008.
- Visual Basic .NET was launched in 2001 along with the .NET Framework. Its language features
are much richer than previous versions, although it is more complex, and many older VB programs must be rewritten to work in
VB.NET.
- In 2004 Microsoft released a beta version of Visual Basic 2005 (codename Whidbey).
Visual Basic and HyperCard
Putting Visual Basic into historical context invites comparison with HyperCard, a programming tool developed by Bill Atkinson,
Dan Winkler, and their associates
at Apple Computer and released in 1987. Both HyperCard and VB initially
present the user with a "drawing" environment in which UI objects can be dragged, sized, captioned, and have a set of properties
edited. Both connect a set of events, associated with the visual objects, to fragments of code. In both cases, the code is
written in a programming language that is intended to cater to the novice and be easy to use. This is not to suggest that VB is a
clone or copy of HyperCard. The relationship is more like that of C or Pascal to ALGOL; one can detect a family resemblance.
Unlike VB, HyperCard's programming language, HyperTalk, like COBOL before it
(and AppleScript after it), consists of syntactically valid English
sentences, such as "Get the number of card buttons." (Whether this actually makes it any easier to read, write, understand, or
maintain than BASIC is arguable.)
The biggest difference, and the reason why VB was a breakthrough in a sense that HyperCard never was, is that VB produced
applications that were virtually indistinguishable in look, feel, and general characteristics from Windows applications produced
with traditional development tools. That is, it produced "real" Windows applications. HyperCard produced HyperCard stacks, not
true Macintosh applications. HyperCard briefly spawned a limited cottage industry of commercial "stackware," rather like the
former market in spreadsheet templates, but saw little commercial application (with notable exceptions: the fully commercial
adventure game Myst was based on an elaborated version of HyperCard). HyperCard "stacks"
were always recognizable as such.
HyperCard made a big impression when it was released in 1987, but for various reasons Apple did not follow it up vigorously or
develop it much beyond what it was in 1987. By the year 2000 Apple had effectively abandoned it; it was officially discontinued
in April, 2004.
Similar languages
Some products are available for other systems that can interpret a subset of the Visual Basic language or similarly target
rapid application development. These products are not source-code compatible with Visual Basic, but the similarity of their
design environments allows Visual Basic expertise to be quickly leveraged into these environments.
- POWERbasic (Windows - DOS) - A
popular alternative to VB - creates small and quick-loading standalone
executables.
- REALbasic (Macintosh - Windows -
Linux) - A popular language that shares some of the same keywords, API, and design-mode interface as Visual Basic.
- Gambas (GNU/Linux) - Attempts to duplicate the ease of use and interface of Visual
Basic.
- HBasic (Qt, GNU/Linux)
- Gnome Basic (Gnome, GNU/Linux) - intended to provide VBA functionality to
GNOME and to GPL licensed applications in general.
Many developers from this project now work on Mono.
- StarOffice Basic - macro language used in StarOffice and OpenOffice.org
See also
External links
|