InfoQ

News

Java Scripting Wish List

Posted by Ian Roughley on Jan 17, 2008 10:09 AM

Community
Java
Topics
Interop ,
Scripting
Tags
Java SE
With the release of Java 6 and JSR 223, developers now have the option of being able to have inter-operability between Java and any of the supported scripting language.  If your scripting language of choice is not supported, making it available is as simple as implementing the necessary connector API.

Mark Fortner has been exploring the capabilities of the Bean Scripting Framework (BSF) with JSR 223, and has found a number of items that could be improved. These include:
  • Universal Scripting Host API - the JRunscript scripting host and the BSF Main class that serves a scripting host provide uneven support for Global functions.  JRunscript has functions for listing directories, copying files etc.  BSF does not.  It would be really useful if we could have a single, open source scripting host with a number of global functions that could be called from any language.

  • Support for XPath & XQuery functions within the scripting host.  There needs to be universal way of fetching and extracting parts of XML-based documents. 
  • Jar/Tar/Bzip/Zip support.  These functions should be similar to the support that Apache Commons VFS provides.  You can enter URLs like tar:gz:http://anyhost/dir/mytar.tar.gz!/mytar.tar!/path/in/tar/README.txt to extract a file from a tarball.  Notice the multiprotocol support at the beginning of the URL (in bold).

  • Mail function within Scripting Host - it would be useful to send files from the scripting host or send email messages.

  • Basic ImageIO capabilities including affine transforms, and file transcoding.  We can currently use the ImageIO classes static methods as a starting point. If someone gets ambitious they could recreate the functionality found in ImageMagick.

  • IDE support in Eclipse -- Currently Tkl and JRuby are supported but there needs to be more all-around support for scripting languages in Eclipse.  The Javascript support seems limited to the browser compatible subset of the language.  Since a lot of people will be trying to get their hands around scripting languages now, having code lookup capabilities will be essential to helping people learn the languages.
Whether these items are necessary in the scripting host, or whether the scripting languages own implementation should be used is debatable.
Perspective by Geoffrey Wiseman Posted Jan 20, 2008 9:45 PM
  1. Back to top

    Perspective

    Jan 20, 2008 9:45 PM by Geoffrey Wiseman

    It's an interesting perspective - personally, I'd rather see them focus on getting a good selection of languages available, well-supported, and solve some of the barriers to entry than work on universal functionality (other than that provided by the Java libraries).

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.