Public Interface of a Server Scriptlet

The XML tag that allows you to shape the public interface of a Server Scriptlet is

<Implements>
. A DHTML Scriptlet is a piece of code that exposes methods and properties. That's all.

A Server Scriptlet, instead, is a piece of code that implements interfaces—one of which is the automation interface that allows a scriptlet to expose methods and properties. From this emerges how a Server Scriptlet is a more general object than a DHTML scriptlet.

All the COM interfaces the scriptlet implements must be declared in the

<Implements>
section and must have an interface handler—that is a run-time module which handles the requests from the clients and transmit them for execution down to the scriptlet. As explained above, at present only an interface handler has been developed to handle the
IDispatch
interface. This handler is built inside
scrobj.dll
. By using it we can create a scriptlet that acts as a real COM object that supports automation.

Given the today's limited support to COM interfaces, you could think that there's not such a great difference between DHTML Scriptlets and Server Scriptlets, at least for the code inside the scriptlet. Today you would be right, but as soon as more interface handlers become available (or rather the documentation to write them) Server Scriptlet will boast an edge in flexibility over the DHTML Scriptlets.

© 1997 by Wrox Press. All rights reserved.