commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject Re: [proposal] JSExtensions - Integrating Java into Javascript
Date Sat, 29 Apr 2006 21:07:56 GMT
On 4/27/06, Don Brown <donald.brown@gmail.com> wrote:
>
> I propose a new commons sandbox project, JSExtensions, aimed at providing
> a
> library of server-side Javascript (Rhino ATM) extensions that better
> integrate Java into the Javascript environment.  This is implemented in
> two
> areas:
>
> - Making the Java collections more natural to Javascript
> - Extending the Java API to add convenience properties and methods


Sounds fine to me. Interesting implementation, too. ;-)

--
Martin Cooper


The inital code will come from Struts Flow[1], a Struts sandbox project that
> brought server-side Javascript to Struts.  In its development, I looked at
> Groovy and saw how they improved the Java API [2] to make it better
> integrated and more natural in the Groovy environment.  I brought its
> ideas
> over to Struts Flow [3], attempting to do the same for Javascript.  This
> code is better suited as an individual project, usable by other
> Javascript-using Apache projects like Cocoon.  In addition, these changes
> make Javascript equally appropriate for standalone shell scripting-type
> tasks.
>
> As a quick example, here is the eachLine() extension method on the
> java.io.File object, printing each line's contents to System.out:
>
> file = new java.io.File("foo.txt");
> file.eachLine(function(line) { print(line) });
>
>
> To be clear, this proposal has nothing to do with client-side Javascript,
> only server-side Javascript through Rhino and soon Java 6.  The code
> already
> runs and uses a special unit testing framework for testing.  Looking
> forward
> to the feedback.
>
> Don
>
> [1] http://struts.apache.org/struts-sandbox/struts-flow/
> [2] http://groovy.codehaus.org/groovy-jdk.html
> [3]
> http://struts.apache.org/struts-sandbox/struts-flow/FileExtensions.html(one
> example)
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message