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

I have several batch processing scenarios that support a small business website.

Scripts are the rat nest of Perl, Java, and stored procedures, which are run on a scheduled basis to update data based on various sources and algorithms.

I want to get rid of Perl so that I can at least use transaction management, keeping the whole process connected to the JVM database from beginning to end.

Which of the various dynamic / scripting Java should use a lever that will meet the following criteria:

  • Straightfoward for porting Perl code, providing similar expressive power, I / O, regular expressions, etc.
  • Good IDE support, including code completion and debugging, preferably in Eclipse
  • Easy to install. Preferably, the entire scripting engine should be in the same jar file.
  • Not an orphan technology. I want to choose something that will continue in 5 years.
  • Of course, pure integration with the rest of the Java code that I already have.

I hope that my criteria are clear enough that this will not be flagged as a subjective issue.

For me, this is definitely a programming issue. I see all these languages ​​as "useful java libraries".

Thanks!

+6
java programming-languages perl jython beanshell
source share
3 answers

To be fair, Jython, JRuby, Groovy - all this would be a good choice. Everyone has decent IDE support, and the syntax is so expressive and more concise than Perl. (Python and Ruby are both indebted to Perl in their concept, so porting from Perl is not a big headache)

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

Judging by current usage trends, I would say that Jython and then JRuby are likely to be the two with the most common support / longevity relative to the rest.

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

+2
source share

I will vote for Jython as it can interact with existing Java code and it has got a strong support base. Don't mention your Python, which is easy to learn and use. Eclipse has pretty good support for syntax highlighting, debugging, and auto-complete. Finally, the installation is very simple, as it is a separate folder (there is no real "installation").

I admit bias, as I used the other tools that you talked about, much less than I have Jython, but I didn’t need it, since Jython was so good.

+2
source share

I have to say that several tests show that Groovy is faster than Jython and BeanShell. The test was conducted using DMelt ( http://jwork.org/dmelt ), where you can switch from one language to another by calling the same Java libraries.

0
source share

All Articles