Helma Logo
main list history
previous version  overview  next version

Version 2 by hannes on 09. April 2009, 11:21

With Google's *announcement|http://googleappengine.blogspot.com/2009/04/seriously-this-time-new-language-on-app.html* of *Java support|http://code.google.com/appengine/docs/java/overview.html* for App Engine we have all of a sudden a very attractive new option for hosting Java based web applications. Of course my first impulse was to check if it would run *Rhino|http://www.mozilla.org/rhino/* and Helma NG (I had little hopes for Helma 1 as it runs a lot of background threads and relies heavily on relational or file based database backends, both of which are not available on App Engine).

To my surprise, Rhino works perfectly out of the box, and I only had to make a few changes to Helma NG to get it running. This is somewhat in contradiction with what *others have found|http://olabini.com/blog/tag/gae/*, and I discovered only later that I was partly lucky for not stomping on any SecurityExceptions, but on the other hand it's by virtue of Rhino not doing a lot of tricks under the hood, and Helma NG doing all its file reading through a unified *resource framework|http://github.com/hns/helma-ng/tree/10f5c896b0e9d9e2193ee24174d084965400520f/src/org/helma/repository*.

This article covers two options, one using the Helma NG webapp framework, and one using the *Jack|http://github.com/tlrobinson/jack/tree/master* interface for JavaScript web applications. Both are currently unfinished and subject to change, but it's enough to get your feet wet.

=== Getting and building Helma NG

First, install the App Engine SDK for Java as described on the *Google pages|http://code.google.com/appengine/docs/java/gettingstarted/installing.html*. Whether you use the Eclipse plugin or the command line SDK shouldn't make a difference. I'm using Eclipse, but things should work in a similar fashion with the command line SDK.

Next, we need Helma NG, which is effectively Rhino with a thin layer of server-related functionality on top. Helma NG currently comes with its own copy of Rhino as we are using some experimental JS 1.8 features, but this may change as soon as these features are included in a Rhino release.

There hasn't been a release of Helma NG in recent times, so you have to get it from either *Subversion|https://dev.helma.org/svn/helma-ng/trunk* or *Git|http://github.com/hns/helma-ng/tree/master*. For Subversion, the command is:

<tt style="font-weight:bold;color:#d33;">svn co https&#58;//dev.helma.org/svn/helma-ng/trunk/ helma-ng</tt>

For Git:

<tt style="font-weight:bold;color:#d33;">git clone git@github.com:hns/helma-ng.git</tt>

You need *Apache Ant|http://ant.apache.org/* to build Helma NG. Change to the helma-ng directory you just checked ou tand run ant it with the "jar" target:

<tt style="font-weight:bold;color:#d33;">ant jar</tt>

If this worked then you should now have a file called lib/helma.jar.

=== Running Helma NG apps

=== Running Jack apps

     removed
     added