3.5 Visual Basic.NET

 < Day Day Up > 



Visual Basic, or VBC is rumored to be Bill Gates' most popular development tool, and on that basis has achieved a lot of focus from Microsoft since it was released as version 1 in 1991. Visual Basic 3.0 introduced Data Access Objects, or DAO-which made the creation of database applications easier than before, although performance was an issue.

With Windows 95, Microsoft released Visual Basic 4.0, and for the first time, Microsoft VB developers had a 32-bit development environment. VB 5.0 introduced ActiveX control authoring for fledgling Internet development, and finally VB 6.0 introduced Web Classes and ActiveX/DHTML development.

Since then, it has been a very barren period between VB 6 and Visual Basic.NET. The reason for this is that it has taken Microsoft a long time to get the development environment right for building Web-based applications, and bringing Visual Basic up-to-date with modern features worthy of a decent development language has been time consuming. Finally, on January 13, 2002, developers could breathe a sigh of relief as Microsoft finally launched Visual Studio.NET and the latest version of Visual Basic.

3.5.1 Inheritance

A major gripe of Visual Basic developers in the past has been the lack of inheritance. Since most new development work relies on reusing code, this has been a stumbling block for Microsoft. By using a new keyword, inherits, functionality can be reused from a base class in other subsequent classes.

3.5.2 Free Threading

Creating any application capable of scaling to support many users in Visual Basic has been difficult in the past since Visual Basic code is executed synchronously-each line of code being executed in turn.

VB.NET supports free threading, a technique that enables a piece of code to go away and run while allowing other code to execute concurrently. This is very useful if you have some code that needs to run a complex query or process, because it can be spawned off from the main application, allowing the main code to continue executing.

3.5.3 Error Handling

Error handling in Visual Basic has traditionally been reliant on the statement On Error GOTO, which has caused problems for large-scale applications, as well as maintenance headaches, since the GOTO  statement leads to spaghetti code. VB.NET has introduced a new error trapping mechanism called Try…Catch…Finally, which provides a structured way of dealing with code errors.

Type checking historically has been fairly lax in Visual Basic, and developers have more or less been given a free hand when it comes to correct use of data types. With the advent of VB.NET and especially the CLR, which is covered later in this chapter, type checking is a crucial part of VB.NET development and is a new discipline that developers will need to learn.



 < Day Day Up > 



Microsoft  .NET. Jumpstart for Systems Administrators and Developers
Microsoft .NET: Jumpstart for Systems Administrators and Developers (Communications (Digital Press))
ISBN: 1555582850
EAN: 2147483647
Year: 2003
Pages: 136
Authors: Nigel Stanley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net