Visual Basic.NET

As of November 2007, there are four versions of Visual Basic .NET that were implemented by The Visual Basic Team.

Visual Basic (VB), formerly called 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 older versions and caused a rift within the developer community.

The original Visual Basic .NET was released alongside Visual C# and ASP.NET in 2002. C# widely touted as Microsoft's answer to Java  received the lion's share of media attention, while VB.NET (sometimes known as VB7) was not as widely covered.

Visual Basic .NET 2003(VB7.1) was released with version 1.1 of the .NET Framework. New features included support for the .NET Compact Framework and a better VB upgrade wizard. Improvements were also made to the performance and reliability of the .NET IDE (particularly the background compiler) and runtime.

Visual Basic 2005(VB8.0) is the name used to refer to the update to Visual Basic .NET, Microsoft having decided to drop the .NET portion of the title. Visual Basic 2005 introduced features meant to fill in the gaps between itself and other "more powerful" .NET languages, adding:

  • .NET 2.0 languages features such as:
    • generics
    • Partial classes, a method of defining some parts of a class in one file and then adding more definitions later; particularly useful for integrating user code with auto-generated code
    • Nullable Types
  • XML comments that can be processed by tools like NDoc to produce "automatic" documentation
  • Operator overloading
  • Support for unsigned integer data types commonly used in other languages

Visual Basic 2008 (VB9.0) was released together with the Microsoft .NET Framework 3.5 on November 19, 2007.For this release, Microsoft added many features, including:

  • A true conditional operator If (boolean, value, value) to replace the IIF function.
  • Anonymous types
  • Support for LINQ
  • Lambda expressions
  • XML Literals
  • Type Inference

Visual Basic 10, also known as VBx, will offer support for the Dynamic Language Runtime (DLR). VB 10 is planned to be part of Silverlight 2.0.

What is Visual Basic? Visual Basic is the most productive tool for rapidly creating a wide range of Windows, Web, Mobile, and Office applications built on the .NET Framework. Visual Basic has a long tradition of helping developers to focus on the task that they are solving. This new version of VB has been specifically designed to target the new programming model provided by .NET 3.5. Both C# 3.0 and VB 2008 are designed to write programs that work with the .NET runtime. Whereas C# 3.0 was designed with C and C++ programmers in mind, VB 2008 is designed to be more accessible to the large base of existing VB programmers. The new language targets the .NET 3.5 programming model and is derived from previous versions of VB, but you'll find that it's quite different. The language changes are due to the fact that in order to support the framework, VB 2008 must provide more object-oriented features as well as type safety.

To understand VB development in the .NET environment, you first need to understand some components of the .NET environment and how they interact. This section summarizes how VB programs are compiled and run in .NET. The execution engine of .NET is known as the common language runtime (CLR). The CLR is primarily responsible for loading and executing code, as well as memory management, security, and handling of types.

The CLR replaces the traditional VB runtime and also eliminates the use of COM, DCOM, MTS, or COM+. VB applications now run in the context of the CLR, so there's no more need for the host of distributed technologies that were once so prevalent. Of course, you can still access COM components if you need to through the interop layer provided by .NET.

VB 2008 and C# 3.0 are nearly identical in what you can accomplish with them; you can use either language to access all the classes and functions provided by the .NET Framework. Essentially, you can do everything in VB 2008 that you can do in C# 3.0, although one language may provide a more streamlined approach than the other, depending on what you're trying to accomplish. When discussing VB 2008 and C# 3.0, it's easier to talk about their differences than their similarities. In the latest release, both languages add new language extensions, including Language-Integrated Query (LINQ), query comprehensions, anonymous types, lambda expressions, and extension methods.

These are main differences of VB.NET from the old mate.

  • The biggest change from VB to VB .NET is, VB .NET is Object-Oriented now. VB .NET now supports all the key OOP features like Inheritance, Polymorphism, Abstraction and Encapsulation. We can now create classes and objects, derive classes from other classes and so on. The major advantage of OOP is code reusability
  • The Command Button now is Button and the TextBox is TextBox instead of Text as in VB6
  • Many new controls have been added to the toolbar to make application development more efficient
  • VB .NET now adds Console Applications to it apart from Windows and Web Applications. Console applications are console oriented applications that run in the DOS version
  • All the built-in VB functionality now is encapsulated in a Namespace (collection of different classes) called System
  • New keywords are added and old one's are either removed or renamed
  • VB .NET is strongly typed which means that we need to declare all the variables by default before using them
  • VB .NET now supports structured exception handling using Try...Catch...Finally syntax
  • The syntax for procedures is changed. Get and Let are replaced by Get and Set
  • Event handling procedures are now passed only two parameters
  • The way we handle data with databases is changed as well. VB .NET now uses ADO .NET, a new data handling model to communicate with databases on local machines or on a network and also it makes handling of data on the Internet easy. All the data in ADO .NET is represented in XML format and is exchanged in the same format. Representing data in XML format allows us for sending large amounts of data on the Internet and it also reduces network traffic when communicating with the database
  • VB .NET now supports Multithreading. A threaded application allows to do number of different things at once, running different execution threads allowing to use system resources
  • Web Development is now an integral part of VB .NET making Web Forms and Web Services two major types of applications

blogspot stats