Re: RE: BeanShell javax.script (JSR-223) adapter impl...

"Pat Niemeyer" <[email protected]> Mon, 13 Jun 2005 14:27:42 -0500 (CDT)
Newsgroups gmane.comp.java.beanshell.devel
Message-ID <[email protected]>
> Can you explain a bit how things will be different in the javax.scripting
> world for Beanshell?

I'm not sure exactly what you mean.  But...

javax.script is just a scripting language neutral API for running scripts
from Java.  It is exactly the same sort of thing as BSF.  If you use
javax.script in your app then presumably you won't be tied to one
particular scripting langauge, but will be able to use any language that
has an adapter.

The javax.script API is a bit different than the BeanShell Interpreter
API, but it does allow you to get at all of the important features.

The main enhancement that was not there in BeanShell (but now is) is the
ability to expose the application environment as a Map interface and have
it mapped directly into the BeanShell namespace.  You can even make your
own hierarchies of namespaces (in javax.script they are called Bindings)
and get the normal inheritence, etc.

Aside from that nothing will really change.  And you can always use the
BeanShell Interpreter API directly if you want to.  Ultimately the package
name may change with the JSR... but we can all talk about that.


Pat




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r