Welcome to the Janaury/2001 issue of the Active Scripting newsletter!
In this monthly newsletter, I cover a variety of topics in Microsoft
Active Scripting including such things as:
- Important News
- Links & brief commentary on articles in magazines and web sites
- Highlights from the Active Scripting FAQ
- Microsoft events, seminars and training
- Books that can help you become more proficient with scripting and
COM
- Mailing lists where you can sign up to be included in lively discussion
on scripting
- Web sites that cater to scripting
- Interviews with people involved with Active Scripting
Of course, I'll be interested in feedback on these topics and any new
ones that you might find useful. You can reach me via email at mark_baker@mindspring.com.
Scripting Chat
Last month I discussed the issue of Active Scripting in a .NET world.
Up to now, there has been very little from Microsoft about the technology's
future aside from some general comments about still being able to create
a scripting host under .NET.
Well, all of this changed during the past week...
On January 16, 2001, Microsoft Program Manager Andrew Clinick wrote a
column on the Microsoft Developer Network (MSDN) web site entitled "Introducing
Visual Studio for Applications" (http://msdn.microsoft.com/voices/scripting01162001.asp
). In this article, Andrew outlined the future of Active Scripting --
or Visual Studio for Applications (VSA) as it will be known from now on.
VSA can be compared to the current Visual Basic for Applications environment
expanded to include Microsoft JScript (and potentially other languages
as well). In the VSA environment, the interface from an application to
the host is much simpler and mimics the interface to the current Microsoft
Script Control; you create an instance of the VSA (called the "runtime")
and pass in the name of the script engine and a special "moniker" which
acts as a descriptor for the customization. Next, you pass in an ICodeProvider
interface (implemented in your host) to the VSA runtime via its setcodeprovider
method. This interface acts as a callback to your host from the VSA so
that the VSA can request the actual script contents. This nice feature
allows the host to manage the script in any number of ways (local file,
database, and so on) including support for pre-compiled script via the
.NET "bytecode." This is quite a leap forward, because one of the weaknesses
of scripting is its slower performance when compared with traditional
compiled languages. However, since VSA is building on the backbone of
.NET with its ability to generate and execute bytecode from a variety
of languages, this advancement comes almost for free. As with the current
generation of Active Scripting engines, VSA engines will be freely available
(they'll have to be if Internet Explorer is upgraded to support VSA).
Up to now, a scripting application that wished to provide the end user
with an "environment" to actually edit, debug, and test the script had
to either provide one or attempt integration with the Microsoft Script
Debugger. However, the Script Debugger was more of a simple testing tool
than a full-featured "studio" allowing for code editing. The integration
was also semi-documented and somewhat troublesome to get working right.
This has all changed in VSA. An application now has 2 choices on how (or
whether) to integrate the VSA development environment - integrated "design-time"
or standalone "design-time." The integrated "design-time" uses the provided
VSA development environment while the standalone variety uses an external
Visual Studio.NET installation. The latter is more powerful and allows
for integration with other Visual Studio projects the end user may be
working with. Of course, the "design-time" environments are not
freely available. You have to license the environment from SummitSoftware
at www.summsoft.com, which is acting
as Microsoft's designate for licensing VSA (and VBA).
VSA is clearly the "next generation" of Active Scripting. Those of you
working with the current generation of the technology should take heart
that Andrew (and other Microsoft people) have indicated that the existing
technology will be around for quite a while given how much software depends
on it. However, if you're working with .NET or thinking about it sometime
this year, you might want to take a look at VSA as it becomes available.
For now, I'll continue to write monthly columns on the existing technology
until there is more to say about VSA.
Microsoft announces Visual
Studio for Applications (VSA)
Head over to http://msdn.microsoft.com/scripting01162001.asp
to read Microsoft Program Manager Andrew Clinick's latest Scripting
Clinick column on this exciting new technology. Also, you might want
to peruse the newsgroups at news://msnews.microsoft.com/public.microsoft.scripting.hosting
and news://msnews.microsoft.com/public.microsoft.dotnet.general
for the latest scuttlebutt.
Highlights
from the Active Scripting FAQ
The Active Scripting FAQ has moved to a quarterly update cycle rather
than the previous monthly one. The rate of entries to the FAQ has slowed
to the point where a monthly update was no longer needed. I expect the
next quarterly update of the FAQ to be ready by the end of the January.
Head over to http://www.mindspring.com/~mark_baker
to get a copy, or review the information on the site. If you want to keep
up to date with the latest version of the FAQ, there is a mailing list
signup on the site
Bookshelf
Many books contain chapters on JScript, VBScript, and so on, but the
creation of Active Scripting hosts and in particular debuggers has remained
something of a hidden art. Most of the material about how to create hosts
and debuggers can be found in my FAQ at http://www.mindspring.com/~mark_baker
. It contains the expertise of a wide range of developers including several
from Microsoft and should help you get started understanding the ins and
outs of the various COM APIs. However, I've listed a series of books that
I've found helpful in working with the Active Scripting COM APIs, or exploring
how Active Scripting can be used. If you know of ones you've found helpful,
please e-mail me and I'll add them to the list.
1) Essential COM, Don Box, Addison Wesley Press
Excellent starting point for beginning COM developers. Travels from an
introduction to basic COM concepts such as the difference between a class
and an interface, apartment vs free-threaded models, marshaling, and security.
A must-have book for serious COM developers that you use over and over
again.
2) COM IDL & Interface Design, Dr. Al Major, Wrox Press
Covers the format of the COM IDL in an understandable way. However, much
of the book is dedicated to design approaches that demonstrate practical
uses of various IDL syntax. The first part of the book is the most useful
if you just want more detail on the various IDL options.
3) Python Programming on Win32, Mark Hammond & Andy Robinson,
O'Reilly Press
Recent book written by the maintainer/developer of the Python Win32 port
and the Active Scripting COM extensions. Great insight into how to use
Python in a COM environment and some good information on using Python
in an Active Scripting application.
4) Effective COM, Don Box, et al., Addison Wesley Press
Following a similar format to the Effective C++ book by Scott Meyers,
Don Box and his fellow authors have put together 50 rules on creating
better COM applications. I've found this book particularly useful when
wanting to double-check an approach to see if there are any hidden pitfalls
that the authors warn about. Keep this one handy!
5) Windows Scripting Host Programmer's Reference, Dino Esposito,
Wrox Press
Review of the Microsoft Windows Scripting Host and ways to use it including
interacting the registry, external files, etc. Good fodder for learning
more about creating a rich Active Scripting host and powerful object model.
6) "Active Scripting API's: Add Powerful Custom Debugging to Your Script-Hosting
App", Mike Pellegrino, Microsoft Systems Journal, December 2000
Good discussion of some of the more detailed aspects of the debugging
interfaces in Active Scripting.
Mailing Lists
and Web sites
http://msdn.microsoft.com/scripting
The starting place for learning and keeping up with Active Scripting.
Go here to begin your journey down the road with this technology.
http://www.deja.com
A great place to search newsgroups for information and get help for that
vexing problem.
http://www.ddj.com/topics/altlang
In a shameless bit of promotion, definitely go here to learn more about
the wide world of scripting. I am working with Dr. Dobbs Journal as the
site host. Occasionally, I may link this newsletter to more detailed information
that would be too verbose for a newsletter. Definitely set a bookmark
on the site!
http://www.codeguru.com
This site has some sample code for Active Scripting that may be useful
to you.
http://www.windows-script.com
MSDN Regional Director Ian Morrish's site concerning all things scripting
under Windows. You'll find a wealth of timely and helpful information
including FAQs, recommended books, news, etc.
http://www.codeproject.com
I really like this site. It is always up-to-date and provides a wealth
of sample code, commentary, and support for developers writing in MFC
(Microsoft Foundation Classes).
News Groups
and Support
News://msnews.microsoft.com/microsoft.public.scripting.hosting
This is the main newsgroup for help and support on creating an Active
Scripting host. You'll find several developers (including myself) actively
helping out people with a variety of issues. This newsgroup serves as
a major source of information for the monthly update to the Active Scripting
FAQ.
News://msnews.microsoft.com/microsoft.public.scripting.debugger
This is a corollary newsgroup to the scripting.hosting one. It deals
more specifically with debugging and use of the Microsoft Script debuggers.
Occasionally there will be Q&A on the Active Scripting debugging API's.
news://msnews.microsoft.com/microsoft.public.dotnet.general
The newsgroup covering general issues with the new Microsoft .NET platform.
news://msnews.microsoft.com/microsoft.public.dotnet.languages.jscript
The newsgroup covering JScript and other scripting issues with the new
Microsoft .NET platform.
news://msnews.microsoft.com/microsoft.public.dotnet.languages.vb
The newsgroup covering Visual Basic and VBScript issues with the new
Microsoft .NET platform. In the .NET platform, VBScript will be subsumed
by the full Visual Basic language so Microsoft just refers to both as
"VB".
Final Thoughts
I hope you will find this newsletter a timely and helpful addition to
your knowledge base about Active Scripting. Please feel free to email
me at mark_baker@mindspring.com
and let me know what you think of it, ways to improve on content, format,
etc., and how this newsletter is helping you.
Until next month,
Cheers!
Mark
|