InfoQ

News

Java Scripting Wish List

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

Community
Java
Topics
Scripting,
Interop
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.

1 comment

Reply

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).

Exclusive Content

Rustan Leino and Mike Barnett on Spec#

Rustan Leino and Mike Barnett of Microsoft Research discuss the technology in Spec# and its futures.

10 Ways to Screw Up with Scrum and XP

Henrik Kniberg talks about 10 possible reasons to fail while doing Scrum and XP. Maybe the team does not have a definition of what Done means to them, or they don't know what their velocity is.

Tips from a Top Sports Team Coach

This article outlines 9 principles Marc Lammers discovered while building the world’s best field hockey team, mapping them to software development practices.

SOA Governance: An Enterprise View

Michael Poulin explains the necessity for SOA governance to ensure an Enterprise SOA's success, relying on concepts from the OASIS SOA Reference Model and Reference Architecture.

Developing Portlets using JSF, Ajax, and Seam (Part 2 of 3)

This article covers setting up a RichFaces portlet using JBoss Portlet Container and JBoss Portlet Bridge, deploying a RichFaces portlet, and RichFaces capabilities.

Scalability Worst Practices

This article discusses scalability worst pratices including The Golden Hammer, Resource Abuse, Big Ball of Mud, Dependency Management, Timeouts, Hero Pattern, Not Automating, and Monitoring.

Do the Hustle

Obie Fernandez shares his experience selling consulting services for both Thoughtworks and Hashrocket and give tips how Ruby developers can work with clients.

Natural Laws of Software Development - Deriving Agile Practices

Jeffries and Hendrickson derive Agile practices from the natural laws of software development. They don't just say "Be Agile!", but they explain why Agile practices make perfect sense.