When Shouldn't You Use Scriptlets?
Scriptlets contain ordinary script code, which can be a disadvantage since the browser must interpret it before producing output. This is not a problem for small and simple components, but might be an issue when the size of the Scriptlet increases. A complex component such as a calendar, composed of a table and some ActiveX Form controls (i.e. combo boxes and text boxes) may take a while to load and respond. The corresponding Office 97 Calendar ActiveX control appears to load and run much faster. Here are some possible snags you should consider carefully before writing and distributing Scriptlets:
-
A Scriptlet may run slower than a corresponding ActiveX control.
-
Scriptlets don't support any kind of code protection, and are open to inspection and alteration by others.
-
A user can modify Scriptlets, inadvertently or not, and this might result in run-time errors.
-
Scriptlets aren't subject to licensing, and may be copied without permission.
-
Scriptlets don't get downloaded if your security level is set to High for the Internet zone they come from.
-
At present, there are no authoring tools that fully support for Scriptlets, though these will surely appear in the near future.
-
A Scriptlet may include a collection of files (video, images, sounds, controls, other Scriptlets or HTML pages), but no utility for gathering all these together in a
CAB
or ZIP
file is available.
-
Scriptlets are supported only by IE4. Netscape Navigator 4 and other browsers simply ignore them.
-
To host Scriptlets in desktop applications you need the Microsoft Scriptlet Control.
-
When using Scriptlets with the Microsoft Scriptlet Control, you need to specify an absolute path to the source code. This works well if the path is a real URL, but forces you to indicate a specific installation directory if you are using it locally.
The lack of dedicated authoring tools is a drawback that should disappear over time. Topics such as licensing and protection might become a central issue if Scriptlets succeed in populating the Windows 98 desktop and folders. Reusable components must be safely and easily distributable, and this issue will need careful consideration when you choose your development strategy.
© 1997 by Wrox Press. All rights reserved.