Showing posts with label IronRuby. Show all posts
Showing posts with label IronRuby. Show all posts

Wednesday, July 18, 2007

JRuby + Hibernate = ActiveHibernate?

A couple of months ago, Ola Bini coined the idea of ActiveHibernate as an extra option when running Rails on JRuby (complementary to ActiveRecord-JDBC). After some debug sessions through the Hibernate and JRuby code I have convinced myself that this is indeed a nice and feasable project to start (or try to, at least). As Ola mentioned there are two parts to this:
  1. Configure/tweak Hibernate to let it work directly with the org.jruby.RubyObject class. I'm already impressed by the clean internal design of the Hibernate code, and the possibility to plug in custom implementations of Hibernate interfaces through the hbm.xml mapping files.
  2. Provide a Rubyish interface to the Hibernate configuration and functionality, following the fine Ruby on Rails tradition.
Point one seems the hardest to me, as I would like to keep the number of changes to org.hibernate (and org.jruby) code very low. None if possible (?). For the second point, ActiveRecord, Grails' O/R mapper (GORM) and Hibernate Annotations can serve as examples to learn from. I'm also looking forward to IronRuby to see if it could be married to NHibernate in a similar way.

As soon as I have something up and running I'll post the code to SourceForge, or RubyForge, or ... What would be the most appropriate hosting site for this kind of project?