Bringing Ruby's ActiveRecord to Java
blog.rapleaf.com
blog.rapleaf.com
I'm really curious if they explored this possibility, and if so why they rejected it.
"However, we evolved to need something more than Ruby."
Maybe they don't want to be seen as bashing Ruby and thus inciting a pointless language flamewar, but it would be interesting to know what problem or set of problems became the pebble in their shoe that eventually they couldn't stand it anymore.
'Evolved' kind of implies a smooth and natural progression, whereas swapping languages is often more ... abrupt.
I haven't used ActiveRecord.. but spent years with Hibernate, and consider it a pretty impecable project compared to other ORMs I've encountered (J2EE's CMP, and Django's ORM, specifically.
The biggest difference to me is that Rails ActiveRecord encourages you to work from the database first. That is, you define your database tables and columns which are then used to generate your classes. In contrast, NHibernate (and I'm assuming Hibernate as well) encourages you to design your classes first and worry about persistence later.
There are merits to both approaches. In general, I'd say that Rails ActiveRecord is much easier to use and get started with while NHibernate allows for more flexibility in your domain model.
Even Django's ORM runs circles around Criteria.. in fact, the API design of the Django stuff is the one thing that I think really shines about it..
no migration support yet, but the rest of the code is there. i've been using it in a number of projects for over a year.
This doesn't do that in Java, it parses rails migrations to generate the java classes for objects with these attributes.
Why is this a problem?
We have a similar setup up where I work, but rails migrations doesn't manage the database schema, that is managed on the java side. Rails still gets all changes to the DB in its objects, but using this setup wouldn't work. I was all excited by the title too, still it's a good solution to their particular problem.
I don't remember what exactly it was that I wanted to do, but it might have been something like building a dynamic table editor. You pull back the resultset, and then whip up a grid and for each column you assign the column heading based on the value from the resultset, and then when you go to update one of the rows you need to remember the name of the column for building the query dynamically. You have to jump through a few hoops, but it isn't hard.
Anyway, once I discovered the superior technology of JPA I never looked back.