Question

I have some batch data-manipulation scripts which support a small business website.

The scripts are a "rat's nest" of Perl, Java, and Stored Procedures, which run on a scheduled basis to update data based on various sources and algorithms.

I want to get rid of the Perl so that I can at least take advantage of transaction management by containing the entire process in a JVM-managed database connection from start to finish.

Which of the various Java dynamic/scripting language should I leverage which will meet the following criteria:

  • Straightfoward to migrate Perl code by providing similar expressive power, I/O, regex's, etc.
  • Good IDE support, including code completion and debugging preferably in Eclipse
  • Easy to install. Preferably the entire scripting engine should be in a single jar file.
  • Not an orphaned technology. I want to pick something that will still be around in 5 years.
  • Of course - clean integration with the rest of the Java code that I already have.

I hope my criteria are clear enough that this does not get tagged as a subjective question.

For me this is definitely a programming question. I see all those languages as just "useful java libraries".

Thanks!

Was it helpful?

Solution

To be fair, Jython, JRuby, Groovy would all be good choices. They all have the decent IDE support, and the syntax is as expressive, and more succinct than Perl. (Python and Ruby both owe a debt to Perl in their conception, so porting from Perl isn't too much of a headache)

Of course, Beanshell and Javascript (in the form of Rhino) will be adequate too, although I'd say that both their syntaxes are less expressive.

Judging on current usage trends, I'd say Jython and then JRuby would probably be the two with the most general support / longevity, in relation to the others.

Really the choice comes down to your level with each of these languages, but of all of them I'd suggest you use Jython, but if your more comfortable with Ruby, JRuby.

OTHER TIPS

I vote Jython since it can interact with existing Java code and it's got a strong support base. Not mention its Python which is easy to learn and use. Eclipse has pretty good support for syntax highlighting, debugging, and auto-complete. Finally the install is super easy since it's a stand alone folder (no real "install").

I'll admit bias since I have used the other tools you mentioned much less than I have Jython but I have not needed to since Jython has fit the needs so well.

I should say that that several benchmarks indicate that Groovy is wins in speed, compared to Jython and BeanShell. The test was performed using DMelt (http://jwork.org/dmelt) framework where you can jump from one language to another, calling same Java libraries.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top