Updated: March 1996
Trivia question: There's an interesting technology for which millions of programmers want to build custom applications, but it requires C++, a software development kit (SDK), and six months of your time to learn. The answer? If, a few years ago, you guessed Microsoft® Windows® 3.0, you would have been right; but if you guessed the Internet today, you are also correct.
Just as Visual Basic® made it easier to develop Windows-based applications (and Visual Basic for Applications (VBA) did the same for Office-based applications), a newly developed subset of the Visual Basic language called Microsoft Visual Basic Scripting Edition (VBScript) will now revolutionize Internet application development.
VBScript will provide scripting, automation, and customization capabilities for World Wide Web browsers. VBScript is a simple subset of the Visual Basic language that is, nevertheless, fully compatible with Visual Basic and Visual Basic for Applications. Think of these three products as follows: Visual Basic is the complete, integrated development environment, while Visual Basic for Applications is a subset of Visual Basic that enables solutions development within applications, and VBScript is a subset that is optimized for Internet browsers and servers.
So how does VBScript work?
VBScript enables developers to write Visual Basic code that lives in the HTML document. As you may know, HTML documents have tags that define heading levels, basic user interface control types, embedded graphics, and other features in addition to the actual text. There is a new tag, <Script>, which is parameterized in this manner: <Language=VBS>. This tells the browser that everything between the <Script> tag and the </Script> tag is to be handled by the VBS language engine. The engine is integrated using interfaces defined in the ActiveX™ Scripting specification.
For example, an HTML document can contain the following syntax between the <Script> and </Script> tags:
Sub BtnHello_OnClick MsgBox "Hello, world!" End Sub
This simple code fragment illustrates embedded VBScript code in an HTML document. When the browser hits the <Script> tag, it calls VBScript to compile the code. In this case, the code is tied to the click event on a button named "BtnHello", and the output is written to a text box. Note that VBScript code is represented as ASCII text in the HTML document, and is compiled on download. Of course, the browser needs to have Visual Basic Script support and must be able to integrate scripting with controls or applets embedded in the HTML stream. This is what future versions of the Internet Explorer, and browsers from Oracle, Spyglass, NetManage, and other companies that license the Microsoft Internet platform will do.
Obtaining VBScript will be easy: You can expect to see VBScript supported on many different platforms by many different browsers, and it can be licensed for free (along with source code) on the Internet. Microsoft hopes that that VBScript's low cost and ease of use will make it a great scripting candidate for your custom applications.
OLE Automation is another key benefit of VBScript. VBScript can be used to manipulate both the browser (Microsoft's Internet Explorer will have an OLE Automation interface) and other applications on the desktop. Perhaps most importantly, it can be used to set properties and methods on OLE Controls (.OCXes) and applets created in Sun Microsystem's Java that are contained within an HTML page, as shown in the following example. The HTML for embedded OLE Controls and Java applets in a Web page might look something like this:
<OBJECT ID=BtnBye CLASSID="{0ba686b4-f7d3-101a-993e-0000c0ef6f5e}" HEIGHT=30 WIDTH=120> </OBJECT>
Working samples can be found at www.microsoft.com/vbscript/.
Finally, VBScript is a subset of the Visual Basic language and upwardly compatible with Visual Basic for Applications. The language specifics are still being defined, but you can expect it to be a simple set of commands and syntax (for example, it will contain no data types except variants). The result of VBScript's simplicity is fast execution. Compared to other scripting solutions, it is very lightweight.
That gives you a technical perspective of VBScript, but what does VBScript mean to your customers and visitors to Web sites? Today, most Web pages consist simply of static text and graphical representations, whereas VBScript enables live, active, interesting, and smart Web pages. You can build pages that respond to questions and queries, ask questions, check user data, calculate expressions, link to other applications, and connect to OLE Controls, applets, and 3-D animations.
VBScript is scheduled to be available in the first half of 1996. Industry supporters of VBScript today include Oracle Corporation, Digital Equipment Corporation, Attachmate Corporation, Asymetrix Corporation, HAHT Software, FTP Software, NetManage, Inc., Scopus Technologies, Spider Technologies, Spyglass, Inc., Vermeer Technologies Inc., Micrografx, Bristol Technology Inc., MainSoft Corporation, Wall Data, Visio Corporation, and Wayfarer Communications.
For more information on the VBScript language and run time, see VBScript: Working Description.