Helma Logo
« Announcing Helma 1.6.0 Helma Update: Javascript 1.7 default in svn, better error pages »
main list

JSAdapter: Helma's missing link?

One of the bigger technical issues Helma has struggled with over the years has been that all of the framework code is implemented in Java, and therefore inaccessible to Javascript and the quick experimental evolution that comes with it. Although Javascript/Rhino has some features that allow for some forms of metaprogramming, implementing a framework such as Helma mainly in Javascript was not really an option so far.

This may change with something like the JSAdapter, which basically provide everything needed to implement Javascript host objects directly in Javascript. For an example, look at the MapAdapter from the Phobos project, which "masks" a java.util.Map as a Javascript object (scroll down towards the end of the file - the actual MapAdapter class is really short). Things like these typically had to be implemted in Java, requiring quite a bit more code and much less flexibility.

JOMP provides similar functionality as JSAdapter, with the added benefit of working on any Javascript object and not requiring another adapter/wrapper.

I did some testing with JSAdapter and committed it to Helma HEAD today as an experimental feature. I'm pretty sure that something like this or JOMP will allow us to shift a lot of existing Java code to Javascript over the next releases.