Wednesday, 20 May 2009

My first google app-engine grails app

Free hosting appeals and you can't beat Google's hardware firepower so Google's App Engine sounds like a great hosting solution. The thing is, now that app-engine supports Java would it do the job for my grails app?
This question was basically answered with the release of grails 1.1.1 which includes support for an app-engine plugin. I decided to give it a try with the squash ladder app as it currently stands.
The first issue I found was that my current project name had already been taken or was not suitable. I probably could have just changed the config file in my current project but I decided to create a new app and if all turned out to be easy, I'd be able to paste in my current code. However all was not easy. I tried following Graeme Rocher's screencast but got errors when trying to generate controllers and views.

This bug is described in the comments on the screencast page and in a nutshell, you need to reinstall the hibernate plugin, generate-all, then uninstall the hibernate plug in again. Its a only a minor hiccup and once you're done it pretty much works as described.

So now I've got a shell of an app with CRUD, hosted and using JDO instead of hibernate. Life is looking pretty sweet. Graeme's comments indicate that GORM is not supported so far, so it will be interesting to see how the rest of my hibernate-luvin code goes. The app is here and I'll post the progress of translating the current code to Google also. Exciting times ahead!

No comments: