Click to return to the Web Content Management home page    
Web Workshop  |  Web Content Management

Visual Basic 6.0: First in its Web Class


Nancy Winnick Cluts
Microsoft Corporation

July 2, 1998

The following article was originally published in Site Builder Network Magazine.

The current beta release (as of July 1998) of Visual Basic® 6.0 Non-MSDN link offers Web developers some exciting new features and functionality.

 

Those of you who have used Microsoft Visual Basic know that the software-development system provides you the ability to create applications and components quickly and easily without sacrificing functionality. You can use Visual Basic either standalone or as part of the Visual Studio® suite. Visual Basic isn't just for the client computer, either. You can use Visual Basic to create enterprise applications, taking advantage of the integrated support for the developer editions of Microsoft Internet Information Server (IIS), Microsoft Message Queue Server and Microsoft Transaction Server.

New functionality in Visual Basic 6.0 includes the ability to integrate databases (such as Microsoft SQL Server, Oracle 7.3.3, and AS/400) with any application. This is accomplished by enhanced support for ActiveX Data Objects (ADO), and means that your corporate databases can be more easily accessed and managed right from the Visual Basic user interface. Visual Basic 6.0's Data Environment Designer allows you to create reusable recordsets that support drag-and-drop functionality. You can also create data-bound forms via drag-and-drop, and easily create reports.

As with most new releases, you can also expect some performance enhancements and new language features. These include the ability for functions to return Arrays, File System objects, and support for Dictionary objects. Be sure to download the special edition of the Microsoft Developer Network Library that was created for Visual Studio 6.0 when you download Visual Basic 6.0. This special edition will give you all of the documentation you need to get cranking on your Visual Basic applications and components.

Last, but not least, the big new feature for Visual Basic 6.0 is the ability to create server-side applications hosted by IIS and viewable on the client via a Web browser. These are known as WebClasses. Any browser from any workstation that supports HTML can host this new type of application.

WebClasses: The Big New Feature

With WebClasses, creating an application that can be exposed via a Web browser is as easy as using a Visual Basic form. The idea behind it is that you separate the application logic from the user interface, just as Cascading Style Sheets (CSS) allow you to separate style from content/data. In simple terms, WebClasses allow you to associate code with a URL. This code can then run on an Internet server.

In order to use WebClasses, use the WebClass Designer built into Visual Basic 6.0. This simple-to-use tool shows you a tree view, representing the pages on your IIS server. These pages are entry points into the server's namespace. The server's namespace is a collection of symbols, such as file names, folder names, or database keys, stored in a hierarchical structure. The objects in the namespace that are used in WebClasses are the same as those used for Active Server Pages (ASP) programming (the Response, Request, and Server objects). As a result, if you program with ASP, you will be familiar with these objects and find WebClasses easy to work with.

Using the WebClass Designer, you can add a WebClass for your project, integrate it into your application, and write the code behind it, refresh the Web browser (hit F5) and debug the code you just wrote. You don't have to go into another tool to create the ASP file or to debug your code. You can do it all from within the integrated environment of Visual Basic 6.0.

Not for Hard-core Developers Only

What if you are not experienced with Visual Basic? Suppose you are a great script developer, and you're contemplating learning a programming language. Which language should you choose? There's C/C++, Java, Visual Basic, FORTRAN, etc. Each language has plusses and minuses.

I have to let you in on a little secret: I am a C/C++ developer, but I have always secretly lusted for the tools that Visual Basic provides. You can do so much using Visual Basic by simply picking up objects with the mouse, whether they are ActiveX controls or Win32 common controls, and dropping them onto a form. Once the item is on the form, you use the Visual Basic language to determine how that control works (that is, you program it).

One of the most attractive features of Visual Basic is how easy it is to learn. Don't let the word basic lead you to believe that you can't do complex things with the language -- you can easily create controls, alter the behavior of objects, and specify data sources with Visual Basic. True, you can also do some customization with scripting, but with a programming language, such as Visual Basic, you can take advantage of some of the Windows features, such as the common controls (including the coolbar and date and time picker) or common dialog boxes, and program them to do exactly what you want.

Ever since developer-technology writer Nancy Cluts became a godmother recently, she's been making us offers we can't refuse.



Back to topBack to top

Did you find this material useful? Gripes? Compliments? Suggestions for other articles? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.