GemStone and Ruby

“We are applying our persistence to the Smalltalk Seaside framework. It will be released [Fall of 2007]. The approach in Seaside will be very similar to what we are looking at doing for Ruby and Rails.”

Since much of ActiveRecord is there because of the impedance mismatch between objects and relational databases, a lot of ActiveRecord will be unnecessary. For example, belongs_to, has_many, etc. are there to support associations (foreign keys in the db, etc) and they are unnecessary. Likewise with acts_as_list, etc. I find it interesting that ActiveRecord requires so many duplicate constructs in violation of the DRY Principle. Declaring associations in your Ruby classes and setting up the foreign keys in the schema. It would all go away.

But we do want to support filters, validations, etc. Whether it will look exactly like ActiveRecord is doubtful because, unlike ActiveRecord, the Ruby objects do not have to be subclassed off of a particular class. The other problem with ActiveRecord that transparent persistence solves is subclassing. There is no good solution to representing a hierarchy of classes in a relational database (sparse tables or table joins). With our persistence, it is automatically supported. Subclass to you heart’s content, mixin any modules into your domain classes. It just works.