Search code examples
javaserver-sidescripting-language

Scripting language to embed into a Java server application


I want to make a business logic of server side Java application as a set of scripts. So I need from a scripting engine:

  1. Maximum Java interoperability (i.e. Spring framework)
  2. Script reloading and recompiling
  3. Easy DB access from scripting language
  4. Clear and simple syntax (some DSL capabilities would be nice to have), easy learning curve for non-hardcore developers
  5. Performance and stability

I had some experience in the similar project with Rhino and it was pretty good. But I want to see if there is something better. Currently I'm looking into Groovy. JRuby and Jython are a bit more complex than I need for this task. Any other suggestion? What to take into consideration?


Solution

  • Groovy.

    Groovy with its builders allows you to build powerful DSLs. All the Ruby guys will say JRuby but the Groovy works the nicest with the java platform.

    Groovy also has a big community and seems to get things fixed quicker than Jython or JRuby. The support in eclipse is extremely good.

    The only other option I would recommend is Clojure but I like whitespace instead of parens.

    And use the Java scripting framework