|
Visual Basic (VB) is an event driven programming language and associated development environment created by Microsoft. Inside business programming, it has one of a big user bases.
These are derived heavy from either BASIC. VB enables Rapid Application Development (RAD) of graphical user interface (GUI) applications, access to databases using DAO, RDO, or ADO, and creation of ActiveX controls. The coder potty conjointly an application using the components provided with Visual Basic itself.
Derivative languages
Microsoft has developed the total of Visual Basic versions for scripting applications:
Visual Basic for Applications (VBA) is included inside numerous Microsoft applications (rather Microsoft Office), and besides within many third-person products such as WordPerfect Office 2002. There are little inconsistencies within a way VBA is implemented in different applications, however these are largely the equivalent language when VB6.
VBScript is the default language for Active Server Pages & can be utilized inside Windows scripting and client-side web page scripting. Although it resembles VB around syntax, these are the separate language & these are executed per Windows Script Host as opposed to the VB runtime. These differences may affect a performance of an ASP internet site (that is to say ineffective string concatenation & absence of short-cutoff evaluation). ASP & VBScript must non become confused by owning ASP.NET which uses Visual Basic.Net
Whilst wishing to produce a freshly programming convienence, Microsoft experienced a guide to either modify the popular Visual Basic 6.Nought, or even produce a entirely fresh convienence from either the ground higher. It chose a latter, & developed Visual Basic .NET, the successor to Visual Basic 6.0, which is part of Microsoft's .NET platform. A VB.Nett programing language occurs as confessedly object-oriented language that is non backwards compatible using VB6, & compiles & diarrhea on the .Nett Framework.
Language features
Visual Basic was designed to exist as usable by tons programmers, whether novice or skillful.
A language is designed to produce it easily to produce elementary GUI applications, but may be utilized to evolve fairly complex applications too.
Programming around VB occurs as combinatiin of visually arranging components on the form, specifying attributes & actions of victims components, & even writing extra lines of code for other functionality.
Since default attributes & actions come defined for a components, the elementary program may be created forswearing the computer programmer getting to write numbers of lines of code.
Performance problems were had by earliest versions, however by owning sooner computers this has turn into less of an issue.
Forms come created utilizing drag and drop techniques. The information palette is utilized to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls use attributes and event handlers associated with the two. Default values come provided after a control is created, however can be changed per coder. Numerous attribute values may be modified when you took process instance according to user actions or even changes in the environment, providing the dynamic application. For instance, code may be inserted into a form resize event handler to reposition a control thus that it remains centered on the form, expands to fill higher the form, etc. By inserting code into a event handler for a keypress inside a text pack, the program could automatically translate the experience of the text existence entered, or block certain characters from either existence inserted.
The Visual Basic application may consist of one or even even supplementary windows, or a single window that contains tike windows, every bit provided per operating system. Panel by having less functionality (e.g., there is no maximize/minimize control) may be utilized to provide pop-higher capabilities. Controls provide a basic functionality of a application, when coder potty insert extra logic inside the appropriate event handlers. E.g., a drop-down combination pack may automatically display its listing & allow the user to choose any element. An event handler is known as whenever an item is selected, which might so execute extrthe code created per software engineer to perform occasionally action according to which element was selected, like populating a related listings.
Or else, the Visual Basic component potty keep around there is no interface, however become available to more software, providing objects that implement functionality. This allows for server-side processing or an add-plug-in model.
A language is garbage collected using reference counting, has a big library of utility objects, & has basic object oriented support. Since a extra green components come involved in a default plan guide, the computer programmer rarely needs to specify extra libraries. Unlike several more programing language, Visual Basic is typically non out break sensitive, although it might transform keywords into a standard pack configuration & inflict a example of variable list to conform to the out break of the entry in the symbol table entry. String comparisons come pack sensitive by default, however may be manufactured outbreak insensitive in case thus desired.
Controversy
Visual Basic occurs as controversial language; numerous coder keep close at hand hard feelings on a quality of Visual Basic. Numbers of software engineer sense that VB is below a babies, & that the language is for youngsters & beginning coder. It was designed to become the elementary language, & numbers of features detected within languages such as C++ and Java are not uncovered around Visual Basic. In the interest of convenience & rapid development, a select few features such as compile time type-checking and variable declaration are turned off by default. This leads to occasionally software engineer praising Visual Basic for how else elementary these are to use, however as well can lead to frustration after software engineer encounter problems that a features would have found (e.g., the misprint getting an "undefined variable" error message).
Numerous critics of Visual Basic teach you that a elementary nature and severity of Visual Basic is harmful in the long start. Several humans use at times learned VB in their have while forgoing learning expert programming practices. Possibly while VB is learned inside a formal schoolroom, a student might non exist as introduced to numerous first harmonic programming techniques & constructs, since lot of the functionality is contained in the single components & not seeable to the software engineer. Since these are conceivable to see training apply VB forgoing learning standard programming practices, this typically leads to opaque code & workarounds. 2nd, with several of the checks & warnings that the compiler implements turned off by default can lead to difficulties around selecting bugs. Experient software engineer working within VB tend to turn such checks in.
Several of the criticisms fired at of Visual BASIC come in point of fact criticisms of its antecedent, BASIC. The illustrious formulation by Edsger Dijkstra was, "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration [http://www.cs.virginia.edu/~evans/cs655/readings/ewd498.html]." (Dijkstra was there are no less vituperative astir FORTRAN, PL/1, COBOL and APL.)
However numbers of of the advocator of Visual Basic teach you that the elementary nature & severity of Visual Basic is its independent nature and severity, allowing for super rapid application development to had Visual Basic coders and a super cold-shoulder learning curve for software engineer from either more languages. In addition, Visual Basic applications might easy become integrated by using databases, a most common requirement. For instance, by applying controls that are bound to a database, these are imaginable to write the VB application that maintains trading tools inside the database while forgoing writing any lines of VB code.
Visual Basic is too the conglomerate of language features & syntax, sustaining less consistency, however further tolerance, than numerous modern programing language. Numerous language features prefer GoSub, In Error, & declaring the nature and severity of a variable per previous character in the title (i personally.e. str$) come bequest from either Visual Basic's BASIC roots, & come involved for backward-compatibility. A syntax of VB is different than virtually all more languages, which can lead to confusion for recently VB software engineer. For instance, a statement "Dim a, b, c As Integer" declares "c" when whole number, however "a" & "b" come declared when Variant. More characteristics include a entry of keyword, variable & function list that are non outbreak sensitive, & an underline "_" must become utilized for the statement to span multiple lines. Occasionally Visual Basic coder perceive these when strengths required to keep away from outbreak-sensitive compiler errors, & inadvertently omitting line-termination characters occasionally languages need (commonly semicolons). E.g., a ability to enter variable & procedure list in any out break may be utilized to the software engineer's benefit: by declaring tons list inside mixed pack, however typing the babies withinside lower berth berth pack elsewhere, allows the software engineer to nature & severity sooner and to detect misprint after a token remains in lower pack.
the language continues to attract lot praise & criticism, & it continues to cater to a big base of users & developers. A language is swell suited surely sort of GUI applications (e.g., forepart to the database), however less suited for others (e.g., compute-attached computer software). A language is super simple & very easily individual clear & so swell suited for maintenance & trend lines – its simplicity & convenient of utilize show you its popularity as a convienence for solving business problems – virtually all business stakeholders don't care just all about technical indicator elegancy & effectiveness; it care about a dollars & cents and numbers effectiveness of Visual Basic.
Programming constructs not present in Visual Basic
Inheritance. Visual Basic versions Five & 6 come object orientated languages however don't include implementation inheritance. VB5 & Half a dozen run all the same include specification of interfaces. That is, one class may use when numbers of distinct interfaces when a coder desires. VB.NET implements the full set of object-oriented features. Visual Basic will bring the specific syntax for access to attributes known as Property methods, & this is typically implemented utilizing getters & setters around C++ or Java. Python has an tantamount notation to VB6's property Let & Make their way.
Threading support not present before Visual Basic .NET.
Exception handling with Try-Catch-Finally before Visual Basic .NET. Errors come handled by an "On Error Goto line" statement.
Built-inbuilt trend lines for a bit of bitwise arithmetic like bit shifting.
Typecasting. VB instead has expressed conversion functions.
Equivalents to C-style pointers are very limited.
Visual Basic is limited to signed integers of 8 to 32 bits (8 to 64 bits in Visual Basic .Nett & integral the future), whereas several more languages provide built-in unsigned whole number.
32-bit & 64-bit Visual Basic is internally limited to UTF-16 strings, although it provides conversion functions to more formats (Sixteen-bit Visual Basic is internally limited to ASCII strings).
Visual Basic doesn't allow constant variables to contain an array. So additional processing is mandatory to emulate this.
When Visual Basic doesn't naturally trend lines these features, software engineer potty construct operate-arounds to give their software similar functionality in case it want.
Behaviors present in Visual Basic
VB has a charted rare traits:
Boolean constant True has numeric value -One. Around virtually all more languages, True is mapped to numeral value Single.
Logical & bitwise operators come unified. It's unlike all the C-derived languages (like Java or Perl), which have separate logical & bitwise operators.
Variable array base. Arrays come declared by specifying a upper & lower bounds within how else similar to Pascal. These are too conceivable to have a Guide Base statement to placed a default lower attached. Utilise of a Stock Base statement potty leading to confusion after reading Visual Basic code & is better avoided by universally explicitly specifying the lower attached of the array. This lower attached is non limited to Cypher or even Ace, because it can too exist as placed by declaration. Therein way, two a lower berth & upper bounds come programmable. Around supplementary subscript-limited languages, a lower attached of the array is non variable. This rare trait doesn't survive inside Visual Basic .NET and VBScript.
Ability to start the application forgoing performing a full phase of the moon compile or even making an executable, allowing for edit-&-prove my point changes.
Comparatively hard integration using a Windows operating system.
Banker's rounding as the default behaviour when converting real numbers to integers.
Whole number come automatically promoted to reals inside expressions involving a normal divison operator (/) and then that section of an odd whole number by an potentially whole number produces a intuitively right effect. There is a specific whole number divide operator (\) which does truncate.
Visual Basic and VB.NET
Visual Basic .NET, VB.NET, is a backwards-incompatible upgrade of Visual Basic to Microsoft's .NET platform. About tons of the above criticisms own been addressed using numbers of of the missing features added. VB.NET has trend lines for threading, advanced object oriented code, Try-Catch-Eventually bars, & zero-depending arrays. Numbers of recently features (primarily from either a .Nett framework) have besides appeared, prefer remoting, web services, 64-bit integers & ADO.NET.
VB.NET is likewise a fully-compiled language (when opposed to last versions which can two compile & interpret the language). Computer program expect compilation potentially whenever a program is exclusively to exist as debugged. This resulted withwithin a total of features existence flushed from either Visual Basic, including a quickly execution of software, & the celebrated edit-&-prove my point feature (this feature is restored in Visual Basic .NET 2005). More important features from either retiring editions were besides flushed including control arrays.
Numbers of of the original critics of Visual Basic okay, praise VB.NET for providing the "complete" language, when two or three supporters of Visual Basic claim VB.NET has processed a language as well complicated & as well protective to utilize for elementary application development. An additional criticism of VB.NET is the incompatibility & deficiency of similarity inside syntax. VB.NET will bring the wizard to help update code, however numerous features are non converted properly. a wizard produces a listings of stores in a code in which the update is uncomplete, however big projects develop numbers of hundreds to thousands of such stores requiring lots of coder period to complete the update. Particularly a Variant information nature and severity, which was a default information nature and severity is no elongated supported. So, software that did non declare a lot variables and/or victims that depended on the Variant information nature and severity just can't exist as converted while forgoing important effort. Software online written inside VB.NET are non suspire to exist as practicably converted back to VB6 code in the least.
A bit of think VB.Nett trend lines might diminish, by having C# becoming the favorite language for .Nett programming. This is despite a fact that two languages compile to the equivalent .NET Common Intermediate Language, with the programming language selection simply a matter of syntax preference.
Other criticisms of Visual Basic
Non existence super portable. These are merely available for Microsoft Windows, although the DOS version was marketed at one time. Nonetheless, lot of the code might process around Microsoft Office applications using VBA, including victims applications running off in Mac OS.
Existence as well heavy. Visual Studio is distributed on many discs, and Visual Basic 6.Zero executables need the Single.Quatern MB runtime library or a Xxiii MB runtime in case a application was developed applying Visual Studio .NET. All the same, when these are indeed distributed around many disks, Visual Studio is in essence the suite of applications, including Visual Basic, Visual C++, Visual Interdev, Visual SourceSafe, Visual J++ ( all in Visual Studio 6.Cypher), & Visual C#, Visual J#, and Visual Basic .NET ( in Visual Studio .NET 2002 onwards). Actually, Visual Basic itself occupies sole a little part of one of the distribution discs.
Getting bugs in the IDE. This has been fixed to the few extent by a series of service packs from either Microsoft.
Within VB6 & anterior versions, a utilise of several core OS functions involved directly calling a Windows API. Due to a unfortunate integration of VB by owning the native Windows API, this numerous days led to require for conversion code & sale level memory "tricks" that were further complex than lower level programing language prefer C.
Evolution of Visual Basic
VB One.Cypher was introduced inside 1991. the approach for connecting a programing language to the gui is from either a supervisor call instruction Tripod (every now and again as well referred to as Ruby), originally developed by Alan Cooper, which was further developed by Cooper & his associates under contract to Microsoft.
Timeline
Visual Basic One.Cypher (Could 1991) was released for Windows.
Visual Basic One.Nought for DOS was released around September 1992. A language itself wwhen non quite compatible sustaining Visual Basic for Windows, as it was actually a next version of Microsoft's DOS-depending BASIC compilers, QuickBASIC and BASIC Professional Development Formulas. A interface was barely in writing, utilizing extended ASCII characters to simulate the appearance of the GUI.
Visual Basic Two.Cypher was freed within November 1992. A programming environment was more easygoing to utilise, & its speed was improved.
Visual Basic Three.Cipher was freed in the summertime of 1993 & came inside Standard and Agency versions. VB3 involved the database engine that can see & write Access databases.
Visual Basic Four.Nought (August 1995) was the number 1 version that may produce 32-bit as well as 16-bit Windows programs. It likewise introduced a ability to write classes inside Visual Basic.
By having version Quintet.Nought (February 1997), Microsoft released Visual Basic solely for 32-bit versions of Windows. Computer programmer world health organization favorite to write Xvi-bit computer software were take a breath to import software online written within Visual Basic Four.Cipher to Visual Basic Five.Zero, & Visual Basic Five.Cypher computer software could well become converted by having Visual Basic Four.Cipher. Visual Basic Five.Cipher likewise introduced a ability to produce customised user controls, also when a ability to compile to indigen Windows practicable code, speeding higher runtime code execution.
Visual Basic 6.Cipher (Mid 1998) improved in a total of areas, including the ability to produce web-depending applications. VB6 is presently scheduled to enter Microsoft's "non-supported phase" starting March 2008.
Visual Basic .NET was launched in 2002 along with the .NET Framework. Its language features come great deal richer than former versions, although these are extra complex. VB .Net is non backwards compatible, therefore several older VB computer program must exist as modified to dislodge features incompatible using VB .Nett (e.g., non-zero base arrays, a apply of Variant, etc.)
Visual Basic .NET 2003 was launched in 2003 along with the .NET Framework 1.1.
Inside 2004 Microsoft released the beta version of Visual Studio.NET 2005 (codename Whidbey). This involved the beta of version Two.Cipher of Visual Basic .NET
Besides inside 2004, Microsoft announced a link to to offering trend lines for Visual Basic hobbyists sustaining a announcement of Visual Basic Express, & Visual Web Creator Express. Two come reduced feature versions of Visual Studio 2005 & trend lines Visual Basic.NET Ii.Cipher.
Within April 2005 Microsoft announced that support for not .Nett versions of Visual Basic would prevent inside two or three years. a Visual Basic community instantly expressed its concern & lobbied users to sign a petition to keep the product alive. Microsoft has and so far refused to vary their position on the matter.
Interestingly, as much as this period, it was involved that Microsoft's newly anti-spyware offering, Microsoft AntiSpyware, was coded in Visual Basic 6.Cipher. This can be explained per fact that a product was "inherited" by owning Microsoft's acquisition of GIANT.
In November 7 2005 Visual Studio 2005 is scheduled to be freed, which includes Visual Basic .NET 2005 along by owning a .NET Framework 2.0.
Visual Basic and HyperCard
Putting Visual Basic into historical context invites comparison by using HyperCard, a programming thing developed by Bill Atkinson, Dan Winkler, and their associates at Apple Computer and released within 1987. Two HyperCard & VB at the start present the user by using a "drawing" environment where UI objects may be dragged, sized, captioned, & have a placed of properties edited. Two attach a placed of cases, associated by having the ocular objects, to fragments of code. Inside two lawsuits, the code is written within a programing language that is meant to cater to the novice & become convenient to utilise. This is does'nt to indicate that VB occurs as clone or even copy of HyperCard. the relationship is extra prefer that of C or even Pascal to ALGOL; of these potty detect a personal resemblance.
Unlike VB, HyperCard's programing 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 gentler to review, write, see, or even maintain than BASIC is arguable.)
A second difference that can develop contributed to the rise of VB is that VB produced applications that were virtually undistinguishable inside look, sense, & general characteristics from either Windows applications produced by owning traditional development information. That is, it produced "true-form" Windows applications. HyperCard produced HyperCard stacks, which don't resemble avowedly Macintosh applications. HyperCard briefly spawned the limited bungalow industry of commercial "stackware," such as like a previous market around spreadsheet templet, however saw little commercial application (sustaining notable exceptions: a fully commercial escapade stake Myst was based on an detailed version of HyperCard). HyperCard "stacks" were universally recognizable per se.
HyperCard processed the large impression after it was freed around 1987, however for even various reasons Apple did non watch it higher smartly or grow it very much beyond what it was within 1987. Per month 2000 Apple got profits abandoned it; it was officially discontinued inside April 1999.
See Also
REALbasic
|