Search code examples
javaperlprogramming-languagesjythonbeanshell

Should I use Jython, JRuby, Beanshell, Groovy, Rhino, or what for this small task?


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!


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.