Search code examples
groovyjrubyjythonrhinojvm-languages

Why not Rhino for JVM apps?


I would like to develop some apps for the JVM using a concise, dynamic language. The most popular choices for this seem to be Jython, JRuby, Groovy, and maybe Clojure.

Rhino appears to be fast and very stable, but I see no books on Rhino development and little discussion. Why is there apparently little use of JavaScript for other than embedded scripting?

Edit: I found this question informative on the viability of Rhino-based development.


Solution

  • I've used Rhino as a part of a production-grade VoiceXML interpreter written in Java and running on the JVM. It works extremely well for this purpose. If I were reimplementing this interpreter from scratch, I would have leaned towards doing even more of my development in JavaScript. So it's definitely an option. You'll need to explore how mature the surrounding libraries are for your application area (you can always write logic that calls out from JavaScript to Java libraries, but that might be too laborious).

    But I also agree with @Peter Recore: do give the other JVM languages a second look. I'm impressed with the object-functional Scala language: its performance is nearly as good as Java, and it has a lot of expressive power.

    Update: Good books to read on JavaScript are: JavaScript: The Definitive Guide and JavaScript: The Good Parts. The only Rhino-specific stuff you'll need is here.