ReviewEssays.com - Term Papers, Book Reports, Research Papers and College Essays
Search

Visual Basic

Essay by   •  December 6, 2010  •  Research Paper  •  3,580 Words (15 Pages)  •  1,802 Views

Essay Preview: Visual Basic

Report this essay
Page 1 of 15

INTRODUCTION

Visual Basic (VB) is an event driven programming language and associated development environment prototyped by Alan Cooper as Project Ruby, then bought and vastly improved upon by Microsoft. In business programming, it has one of the largest user bases.

It is derived heavily from BASIC and enables rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using DAO, RDO, or ADO, and creation of ActiveX controls and objects. A programmer can put together an application using the components provided with Visual Basic itself.

As of 2003, 52 percent of software developers used Visual Basic, making it the most popular programming language at that time. 43 percent of those Visual Basic developers, however, planned to move to other languages.[1] The popularity of Visual Basic perhaps results from its easy to understand syntax. Like all other Turing complete programming languages, it can also be used to create arbitrarily complex applications. Programs written in Visual Basic can use the Windows API, but doing so requires external function declarations.

DERIVATIVE LANGUAGES

Microsoft has developed derivatives of Visual Basic for use in scripting. It is derived heavily from BASIC and host applications, and has replaced the original Visual Basic language with a .NET platform version:

- Visual Basic for Applications (VBA) is included in many Microsoft applications (like Microsoft Office), and also in several third-party products like WordPerfect Office 2002. There are small inconsistencies in the way VBA is implemented in different applications, but it is largely the same language as VB6.

- VBScript is the default language for Active Server Pages and can be used in Windows scripting and client-side web page scripting. Although it resembles VB in syntax, it is a separate language and it is executed by the Windows Script Host as opposed to the VB runtime. These differences can affect the performance of an ASP web site (namely inefficient string concatenation and absence of short-cut evaluation). ASP and VBScript must not be confused with ASP.NET which uses Visual Basic.Net or any other language that targets the .NET Common Language Runtime.

- Visual Basic .NET is the successor to Visual Basic 6.0, which is part of Microsoft's .NET platform. The VB.NET programming language is a true object-oriented language that compiles and runs on the .NET Framework. VB.NET is a totally new tool from the ground up, not backwards compatible with VB6. It ships with a basic converter to upgrade legacy VB6 code although the inefficient nature of the resulting VB.NET code (due to major differences between the two languages) often leads programmers to prefer manual conversion instead. This usually involves re-writing much of the code although in doing so, the programmer can simplify and improve the code through use of the extensive .NET framework and the more powerful constructs offered by the newer language.

LANGUAGE FEATURES

Visual Basic was designed to be usable by all programmers, whether novice or expert. The language is designed to make it easy to create simple GUI applications, but also has the flexibility to develop fairly complex applications as well. Programming in VB is a combination of visually arranging components on a form, specifying attributes and actions of those components, and writing additional lines of code for more functionality. Since default attributes and actions are defined for the components, a simple program can be created without the programmer having to write many lines of code. Performance problems were experienced by earlier versions, but with faster computers and native code compilation this has become less of an issue.

Although programs can be compiled into native code executables from version 5 onwards, they still require the presence of runtime libraries of approximately 2 MB in size. This runtime is included by default in Windows 2000 and later, but for earlier versions of Windows it must be distributed together with the executable.

Forms are created using drag and drop techniques. A tools palette is used to place controls (e.g., text boxes, buttons, etc.) on the form (window). Controls have attributes and event handlers associated with them. Default values are provided when the control is created, but may be changed by the programmer. Many attribute values can be modified during run time based on user actions or changes in the environment, providing a dynamic application. For example, code can be inserted into the form resize event handler to reposition a control so that it remains centered on the form, expands to fill up the form, etc. By inserting code into the event handler for a keypress in a text box, the program can automatically translate the case of the text being entered, or even prevent certain characters from being inserted.

A Visual Basic application can consist of one or more windows, or a single window that contains MDI child windows, as provided by the operating system. Dialog boxes with less functionality (e.g., no maximize/minimize control) can be used to provide pop-up capabilities. Controls provide the basic functionality of the application, while programmers can insert additional logic within the appropriate event handlers. For example, a drop-down combination box will automatically display its list and allow the user to select any element. An event handler is called when an item is selected, which can then execute additional code created by the programmer to perform some action based on which element was selected, such as populating a related list.

Alternatively, a Visual Basic component can have no user interface, and instead provide ActiveX objects to other programs via Component Object Model (COM). This allows for server-side processing or an add-in module.

The language is garbage collected using reference counting, has a large library of utility objects, and has basic object oriented support. Since the more common components are included in the default project template, the programmer seldom needs to specify additional libraries. Unlike many other programming languages, Visual Basic is generally not case sensitive, although it will transform keywords into a standard case configuration and force the case of variable names to conform to the case of the entry within the symbol table entry. String comparisons are case sensitive by default, but can be made case insensitive if so desired

CONTROVERSY

Visual Basic is a controversial language; many programmers have strong feelings regarding the quality of Visual Basic and

...

...

Download as:   txt (22.6 Kb)   pdf (237.8 Kb)   docx (18.5 Kb)  
Continue for 14 more pages »
Only available on ReviewEssays.com