Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[e4-dev] Integration of Scripting Languages

Hi,

I just met an old opensource friend in Vienna and we talked naturally a
bit about e4 and discussed the fact that we plan to allow people to use
languages other than Java to write your bundles in (e.g. JavaScript) and
he asked me whether we are using the Apache-BSF [1] (where he's a
committer on) which provides a generic way of integrating
Scripting-Frameworks using the javax.scripting-API (Part of Java6) but
provides this function starting with Java-1.4!

I asked him to write up some sentances about it and here's the mail he
just sent me some minutes ago:

----------8<--------------
Any Java application and framework that allows for scripting should
employ the Java 6 "javax.script" a.k.a. JSR-223 framework to invoke
scripts. Apache's BSF 3.0 makes this functionality available on pre
Java-6 installations, needing only a Java baseline of Java version 1.4.

This way not only JavaScript (mostlikely the Rhino implementation) can
be used to create and run scripts for Java applications and Java
frameworks, but *any* of the many scripting languages for which script
engines have been written for BSF 3.0/"javax.script" and listed e.g. at
<https://scripting.dev.java.net/> with no real additional effort on the
side of the Java application and framework implementors.

This way programmers who have fallen in "love" with a particular
scripting language are not locked out of scripting Eclipse, but rather
can be attracted to script Eclipse.

Here are some links:

    * <http://jakarta.apache.org/bsf/>: homepage of BSF 3.0 (brief
synopsis/overview at the top of the page), the BSF 3.0 section at the
end of the page has links to the JSR-223 spec and Sun's documentation of
"javax.script",
    * <http://javacook.darwinsys.com/new_recipes/26callingall.jsp>:
"Java Cookbook Recipe 26.x - Calling All Languages - from javax.script",
    *
<http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/>:
article "Scripting for the Java Platform" explaining "javax.script",
    * <http://developers.sun.com/scripting/index.jsp>: Sun's scripting
homepage.
----------8<--------------

What I'd like to propose is that instead of using Rhino-Directly in
JSContributionFactory to go through the BSF and hence support various
scripting frameworks out of the box.

Tom

[1]http://jakarta.apache.org/bsf/

-- 
B e s t S o l u t i o n . a t                        EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl                                        geschaeftsfuehrer/CEO
------------------------------------------------------------------------
eduard-bodem-gasse 5/1    A-6020 innsbruck      phone    ++43 512 935834


Back to the top