Visual Basic
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:\n*
VBScript is the default language for
Active Server Pages and can be used in windows scripting and client-side
web page scripting. \n*
Visual Basic .NET is a backwards incompatible upgrade of Visual Basic 6.0, and is part of Microsoft's
.NET platform.\n*
Visual Basic for Applications (VBA) is built into every product in the
Microsoft Office family, and also in several third-party products like
Visio (now owned by Microsoft) and
WordPerfect Office 2002.
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.
Controversy
Visual Basic is a very controversal language; many programmers have strong feelings regarding the quality of Visual Basic. VB was designed to be a simple language, and many features found in traditional languages like C, C++, Java, and even C# are not found in VB (most notably, object oriented programming). Other features like compile time type checking and variable decleration can be turned off. This leads to programmers praising VB for how simple it is to use, but also leads to frustration when programmers realize they need to use a feature that has been removed.
Many critics of Visual Basic explain that the simple nature of Visual Basic is harmful in the long run. Learning to program in Visual Basic does not introduce the programmer to many useful programming techniques and constructs, leading to inelegeant code and workarounds. Secondly, allowing the programmer to turn off many of the checks and warnings a compiler implements leads to hard to find bugs. On the other hand, the simple nature of Visual Basic is its main strength, allowing very rapid application development to experienced VB coders and a very slight learning curve for programmers coming from some other language.
Visual Basic is also a conglomerate of language features and syntax, with less consistency than many modern programming languages. Many language features like GoSub, On Error, and declaring the type of a variable by the last character in the name (i.e. str$) are relics from VB's BASIC roots. Other oddities include variable names are not case sensitive and an underscore "_" must be used for a statement to span multiple lines.
The language continues to attract much criticism but also continues to cater to a large base of users and developers.
List of features missing from Visual Basic
- Object-oriented programming. Visual Basic has simple support for object oriented programming but many common object oriented features are not present.\n* threading support.\n* Nested error handling with Try-Catch-Finally. Errors are handled by an "On Error Goto line#" statement.\n* Strict type checking. Strict type checking can be turned on/off with the statement "Option Strict On/Off".\n* Array Base. Arrays can have a base of zero or one (controlled by the Option Base statement), leading to confusion when reading VB code.\n* C style Pointers. Visual Basic instead has references that can not be manipulated as integers.
Visual Basic and VB.NET
Visual Basic.NET is a backwards incompatible upgrade of Visual Basic to Microsoft's .NET platform. Many of the above criticisms have been addressed with many of the missing features added. VB.NET has support for threading, advanced object oriented code, Try-Catch-Finally blocks, and zero based arrays. Many new features (mainly from the .NET platform) have also appeared, like remoting, web services, and ADO.NET.
The VB.NET upgrade is also very controversal. Many of the original critics of Visual Basic now praise VB.NET for providing a "complete" langauge, while supporters of Visual Basic claim VB.NET has made the language too complicated and too hard to use for simple application development. Another criticism of VB.NET is the incompatibility. VB.NET provides a wizard to help upgrade code, but many features are not converted properly. The wizard produces a list of places in the code where the upgrade is incomplete, but large projects have many thousands of such places requiring lots of programmer time to complete the upgrade.
Other 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.\n* Too big. Visual Studio is distributed on several discs, and executables require a 1.4MB runtime library.\n* Poor mathematical performance.\n* Bugs in the IDE. This is fixed to some extent by a series of service packs from Microsoft.
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.\n* REALbasic (Macintosh - Windows - Linux) - A popular language that shares some of the same keywords, API, and design-mode interface as Visual Basic.\n*Gambas (GNU/Linux) - Attempts to duplicate the ease of use and interface of Visual Basic. \n* HBasic (Qt, GNU/Linux)\n* 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.\n* StarOffice Basic - macro language used in StarOffice and OpenOffice.org
See also
\n* Hello, world! program in Visual Basic\n* Microsoft Visual Studio
External links
\n*Visual Basic at MSDN (primarily supports the VB.Net version)\n*VB 6.0 at MSDN\n*Visual Basic Section on About.com\n*Visual Basic Tutorial for Beginners
\n\n\n\n\n\n\n\n\n\n\n\n\n
Category:Programming languages