Visual Basic .NET (VB.NET) is an object-oriented computer language that can be viewed as an evolution of Microsoft's Visual Basic (VB) implemented on the Microsoft .NET framework. Its introduction has been controversial, as significant changes were made that broke backward compatibility with VB and caused a rift within the developer community.
The great majority of VB.NET developers use Visual Studio .NET as their integrated development environment (IDE). SharpDevelop provides an open-source alternative IDE.
Like all .NET languages, programs written in VB.NET require the .NET framework to execute.
Those that did try the first version found a powerful but very different language under the hood, with disadvantages in some areas, including a runtime that was ten times as large to package as the VB6 runtime and a greatly increased memory footprint.
In addition, Visual Basic .NET 2003 was also available in the Visual Studio .NET 2003 Academic Edition (VS03AE). VS03AE is distributed to a certain number of scholars from each country for free.
For this release, Microsoft added many features in an attempt to reintroduce some of the ease of use that Visual Basic is famous for — or infamous, with respect to "newbie" programmers — including:
The above functions (particularly My) are intended to reinforce Visual Basic .NET's focus as a rapid application development platform and further differentiate it from C#.
Visual Basic 2005 introduced features meant to fill in the gaps between itself and other "more powerful" .NET languages, adding:
If Not X Is Y to If X IsNot Y which gained notoriety when it was found to be the subject of a Microsoft patent application.
The Express Editions are targeted specifically for people learning a language. They have a streamlined version of the user interface, and lack more advanced features of the standard versions. On the other hand, Visual Basic 2005 Express Edition does contain the Visual Basic 6.0 converter, so it is a reasonable way to evaluate feasibility of conversion from older versions of Visual Basic.
The things that have changed significantly are the semantics — from those of an object based programming language running on a deterministic, reference-counted engine based on COM to a fully object-oriented language backed by the .NET Framework, which consists of a combination of the Common Language Runtime (a virtual machine using generational garbage collection and a just-in-time compilation engine) and a far larger class library. The increased breadth of the latter is also a problem that VB developers have to deal with when coming to the language, although this is somewhat addressed by the My feature in Visual Studio 2005.
The changes have altered many underlying assumptions about the "right" thing to do with respect to performance and maintainability. Some functions and libraries no longer exist; others are available, but not as efficient as the "native" .NET alternatives. Even if they compile, most converted VB6 applications will require some level of refactoring to take full advantage of the new language. Extensive documentation is available to cover changes in the syntax, debugging applications, deployment and terminology.
Classic VB example:
Private Sub Command1_Click() MsgBox "Hello, World" End Sub
A VB.NET example:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MessageBox.Show("Hello, World") End Sub
Call keyword)
Command1 and Button1 are not obligatory. However, these are default names for a command button in VB6 and VB.NET respectively.
The following example demonstrates a difference between VB6 and VB.NET. Both examples unload the active window.
Classic VB Example: Private Sub cmdClose_Click() Unload Me End Sub
A VB.NET example: Private Sub cmdClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click Me.Close() End Sub
VB.NET's supporters state that the new language is in most respects more powerful than the original, incorporating modern object oriented programming paradigms in a more natural, coherent and complete manner than was possible with earlier versions. Opponents tend not to disagree with this, instead taking the position that although VB6 has flaws in its object model, the cost in terms of redevelopment effort is too high for any benefits that might be gained by converting to VB.NET. Independent developers producing software for Internet distribution have also taken issue with the size of the runtime.
It is simpler to decompile languages that target Microsoft Intermediate Language, including VB.NET, compared to languages that compile to machine code.
Microsoft supplies an automated VB6-to-VB.NET converter with Visual Studio .NET, which has improved over time, but it cannot convert all code, and almost all non-trivial programs will need some manual effort to compile. Most will need a significant level of refactoring to work optimally. Visual Basic programs that are mainly algorithmic in nature can be migrated with few difficulties; those that rely heavily on such features as database support, graphics, unmanaged operations or on implementation details are more troublesome. Unfortunately, these functions are core to many business applications.
In addition, the required runtime libraries for VB6 programs are provided with Windows 98 SE and above, while VB.NET programs require the installation of the significantly larger .NET Framework. The framework is included with Windows Vista, Windows XP Media Center Edition, Windows XP Tablet PC Edition and Windows Server 2003. For other supported operating systems such as Windows XP, it must be separately installed. This has created much inconvenience to both programmers and users.
Microsoft's response to developer dissatisfaction has focused around making it easier to move new development and shift existing codebases from VB6 to VB.NET. Their latest offering is the VBRun website, which offers code samples and articles for:
A += B will result in a compilation error and has to be replaced by A = A + B; while either piece of code will compile in version 2005.
BASIC programming language family | .NET programming languages | Microsoft Visual Studio | Microsoft BASIC
Visual Basic .NET | Visual Basic .NET | Visual Basic.NET | Visual Basic .NET | 비주얼 베이직 닷넷 | Visual Basic .NET | Visual Basic .NET | Microsoft Visual Basic .NET | Visual Basic .NET | Visual Basic .NET | Visual Basic .NET | Visual Basic .NET | Visual Basic .NET | Visual Basic .NET
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Visual Basic .NET".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world