RegisterLog In/Log OutView Cart
O'Reilly Ron's VB Forum Ron's VB Forum
BooksSafari BookshelfConferencesO'Reilly NetworkO'Reilly GearLearning Lab
 


Traveling to
a tech show?

Hotel Search
Hotel Discounts
Discount Hotels
Chicago Hotels
Canada Hotels
California Hotels
Hotels




Date: Jan 3 1999
From: Steve Osterday
To: ron@oreilly.com
Subject: VBScript mainstream?

Ron,

If VBScript is going to become mainstream I would like to buy a book about it. When I research books on the subject I find no books less than a year old. When I go to ACSES.COM and search for books on VBScript I get a list of 6. When I search for books on JavaScript I get a list of 37 and many of them are less than a year old.

My main interest right now is developing scripts to be used by HyperAccess, a communications program. I might later decide to include some stuff in a home page.

I don't want to waste my time learning a program if it's not going to continually be developed and used.

One author of a VBScript book said he abandoned VBScript because Netscape was never going to support it and it changed so radically as to not be totally compatible from previous incarnations.

I would like to hear your opinions on this subject as well as how to best get started for a beginner with little or no programming experience.

Thanks,
--Steve


Hi Steve,

Microsoft is committed to VBScript and tends to time each new release of the language with a new release of Internet Explorer. It seems clear that VBScript has a long future ahead of it. In particular, it is the major scripting language used in server-side scripting with Active Server Pages and in Windows scripting with Windows Scripting Host. So in terms of your concern that VBScript may not be continually developed and used, the short answer is that is definitely will be continually developed and used for as long as anyone can anticipate.

I'm unfamiliar with HyperAccess, but it seems to me worthwhile in any case to try to clear up some of your confusion (which, I think, is very widespread -- you're by no means the only one who is confused) concerning VBScript.

I think that your paragraph about the author abandoning VBScript reflects both misconceptions. In particular, that VBScript isn't viable because Netscape is never going to support it (which is true), and that it changes so radically from version to version as to be incompatible with itself. So let me address each in turn.

VBScript was first released as a client-side scripting language that competed directly with JavaScript. (Incidentally, it was roughly at this point that most of the VBScript books were published -- and so almost all focused on client-side scripting with VBScript.) But in fact Netscape never supported VBScript, and so VBScript as a scripting language never became very popular, except in corporations that had standardized on IE as the only supported browser for their corporate intranets. Since then, Microsoft has released several scriptable software products, including IIS/Active Server Pages (which has become the predominant platform for server-side scripting) and Windows Scripting Host. VBScript has found its home as the major scripting language for both of these products.

All of that is to say that if you're looking to develop client-side scripts that will run on all browsers, then VBScript is definitely the wrong choice. If you're going to do something that's does not need to run on every brower, or that does not even rely on a browser at all, then VBScript may be (and probably is) a sound choice.

That leads to the second problem, which is that VBScript is perceived as changing from version to version, so that one version is not compatible with previous versions. This perception in fact has no basis in reality. VBScript has been enhanced and new language features have been added from version to version, but no incompatibilities have been introduced.

The belief that versions are incompatible with one another is based on confusion about what it is that is changing. Unlike most software vendors, Microsoft maintains a rigid separation between the object model of scriptable application or system software and the language used to do the scripting. This means that all of Microsoft's scriptable products are language-independent: you can use any language that supports a COM interface, whether it's VBScript, JScript (Microsoft's implementation of JavaScript), Perl, Rexx, Python, or whatever else is available. Outside of the Microsoft community, though, this division of language and object model isn't very well understood. In addition, this division is not implemented in competing scripting languages; Netscape's implementation of the JavaScript language, for instance, includes a browser object model (in contrast, the IE object model is implemented externally to JScript).

To make a long story short, object model changes have been responsible for the charge that VBScript has become incompatible from version to version. We're actually talking about one set of changes in the object model, from IE3 to IE4.

So in any case, VBScript is certainly a viable scripting language. It's also a subset of Visual Basic, which is becoming more and more important as *the* development tool for n-tier applications. So if you know the former, learning the latter becomes substantially easier.

In answer to your question about how to get started with VBScript, I'd still recommend our book, Learning VBScript. It does have two problems, one stemming from the fact that its focus is client-side scripting (which isn't what you're interested it), and the other from the fact that it was written using IE3 and a beta of IE4, so some of the sample programs are broken if run under IE4. (Incidentally, we're working on updates, and expect to have them on our web site in about a month.)

That said, I think that the book still gives a very good, fast-paced overview of the major language elements and illustrates their use in a client-side scripting context; in fact, it remains the finest introduction to VBScript that I've seen. My sense is that, once you grasp the use of particular language constructs, you can begin to use them in other contexts -- and in particular in scripting for HyperAccess (assuming, of course, that it supports VBScript as a scripting language).

I hope that this helps answer your questions.

--Ron

Return to: Ron's VB Forum



O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.