Skip to main content

Suggest me a scripting language for blueMarine, Java compatible

Posted by fabriziogiudici on October 10, 2008 at 7:10 AM PDT

I've said a lot of times that I don't like scripting languages, and in fact all of my work is currently done in Java. I see it as perfectly fitting my needs, from JME to JEE, through the Desktop. But I believe in Domain Specific Languages, and I could be near to use one. In fact, I need to add scripting support for blueMarine, also considering that other applications such as Adobe Lightroom support scripting. Scripting would be targeted to users, for instance to add simple rules to automate the workflow of photo management (the first things I'd like to implement are about metadata transformation).

Now, the question: which language to use? From a certain point of view, I'd like to use Lua, it's definitely not one of the most known, but it's used by Lightroom and it would be nice to implement some compatibility (to be more precise, it looks like most of Lightroom itself is written in Lua). But, of course, implementing compatible functions is a step for the future, so in the meantime I could use something else. Of course, the language must be available on the Java platform (Lua seems to be, but I don't understand whether it's done in the standard JSR 223 way or not).

So, what? Groovy? Javascript?

Keep in mind that this would be used by advanced photographers, not people with a degree in computer science, so it should be easy.

Technorati Tags: , ,

Comments

Why do you have to choose a scripting language? Isn't one of the points of the Java 6 scripting API (in javax.script) that it works with whatever scripting language the end user wants to use? You don't have to choose the scripting language for the user. Just bind the objects that you want to expose via the scripting API, and let the user use them with whatever scripting language they choose.

Hello, I think javascript is directly usable with java6 and well know for many developers. Beanshell could be a candidate but the projet is lifeless (JAlbum uses it to script complexes images process) Lua seams to be more linked this C libraries and more specialized in game development. Vincent

We have been using BSH, since it is so close to Java. But it is a licensing problem. So we are also looking for alternatives, one could be MVEL since it comes with its own templating. Besides that I guess JavaScript is the most widely known alternative. Which is important for product scripting. TCL used to be successfull in that area as well. Gruss Bernd

Thank you. It's a strange error in a redirector that I can't track down. In any case, I have planned to put the site availability to be checked by Hudson, and I think I must do it ASAP... Now it's back online.

http://bluemarine.tidalwave.it/ is giving an HTTP 400 error right now!

more people know javascript than other scripting languages put together? and lots of books and online resources for javascript - altho most geared for web/dom programming

If the target audience is graphics professionals, then JavaScript makes sense since they're probably already working with it in HTML or as ActionScript in Flash.

"easy" is always subjective. I would say pick any JSR 223 compliant scripting language, make the interface work, then worry about which language the target audience will find productive. Since you are a Java programmer go with Groovy or Beanshell since the syntax is so close to what you are used to.

I've been trying out Python at work for the last few weeks for some database conversions. I'm really starting to like it, it's very easy to pick up, yet very powerful due to a huge set of supporting libraries/modules. It looks like there are various projects to integrate into a java application, these being the most interesting in the 10 minutes I spent looking just now (though I've no idea how they relate to JSR 223): JPype: http://jpype.sourceforge.net/ Jepp: http://jepp.sourceforge.net/ Cheers, Dave.

groovy and ruby can be used to create DSL easy to use to non teach people. ps.sorry my bad english

Yes - but I have to start with a single one :-) (BTW, this is in my "mental pipeline": I won't start writing code in this area for about amount, in the meantime I'd like to make my mind about it).

Lua seems to be decent choice.. but you're mentioning JSR 223, so I'm asking myself why limiting blueMarine to a single scripting language?

#1 choice: Python. Or in your case, its Java implementation, Jython. I don't know how Java-compatible LUA is. It's used a lot in games and supposedly is quite fast and simple. However, more people out there in the wild already know Python, and it's being used as a scripting language in many applications already.

Hmm, depends perhaps on the target audience. Perhaps LUA is more "User" friendly, but if you think about plugins coded by developers I would try out Python (Jython) or go with a DSL based on JRuby.