Hi,

On Thu, May 29, 2008 at 8:44 PM, janandith jayawardena
<[EMAIL PROTECTED]> wrote:
> ...Why does javascript module contain "wrapper" , "helper"  and "io" classes
> instead of having only a Factory and an Engine like modules for other
> scripting languages....

Wrappers are used to give simpler access to important objects (Node,
Property, etc.) from javascript - they're a small layer on top of java
objects that make those objects more convenient to use in javascript.
They might or might not have equivalents in other scripting languages.

The helpers are utility classes.

The io package contains a specialized Reader that turns our ECMAscript
pages (*.esp scripts) into javascript code, transforming literal
template elements into out.print calls.

So these classes are specific to the javascript engine, and not
required for other languages, as you correctly indicate. The only
required classes for a new script engine are the factory and engine.

Also, the other script engines (velocity, ruby, freemarker) are less
"advanced" because AFAIK no one is actively using them currently,
whereas the javascript and JSP engines are widely used.

-Bertrand

Reply via email to