Examing Microsoft's Scriptlets
By Rick Dobson
Despite the whining over browser incompatibilities, Dynamic
HTML (DHTML) is pretty exciting stuff. Unfortunately, tapping
its many strengths requires programming. Wouldn't it be great
if you could write a script once, and reuse it in other Web applications?
That's where scriptlets come in.
Scriptlets are a Microsoft-specific
technology that lets developers turn DHTML scripts into Web objects.
The object-oriented benefits mean scriptlets can encapsulate code
and expose properties, methods, and events in a familiar object
metaphor. This approach also lets you reuse your scripts over
and over.
This article provides a broad overview of scriptlets and presents
three examples that show you how to design and use them in your
work. I'll wrap up by looking at some potential drawbacks
and describing which environments are best suited for scriptlet
technology.
Benefits and Features
Scriptlets let you transform ordinary scripts into objects
that work on the Web. You can write a scriptlet object once and
then reuse it on many other Web pages. By encapsulating code in
scriptlets, you simplify its maintenance. Change a scriptlet once
to revise automatically all applications relying on it. Encapsulation
also helps advanced developers better serve large pools of Web
designers by permitting the delivery of Web objects with a standard
industry interface with which many designers are familiar.<>