fredag, augusti 10, 2007

ActiveHibernate is happening

So, it seems someone stepped up to the challenge and started working on ActiveHibernate from me initial idea. The code got pushed online a while back and I have finally had the time to look at it. Over all it looks really nice.

Of course, it's very early times. I've submitted some patches making the configuration aspect easier and more AcitveRecord like - but it's going to be important to have access to all the features of Hibernate too. When in the balance, I don't think we should aim for total ActiveRecord equivalence.

Read more here and find the Google Code project here.

I would encourage everyone interested in a merger between Rails and Hibernate to take a look at this. Now is the time to come with advice on how it should work, what it should do and how it should look like.

7 kommentarer:

Anonym sa...

Question: why Hibernate? Why not OpenJPA for example? I'm asking mostly because of licensing issues. Hibernate is LGPL which still causes a lot of compatibility issues with other Open Source licenses (mostly BSD or Apache-style).

Charles Oliver Nutter sa...

matthieu: An excellent question. I suppose it's currently hibernate because that's what someone decided to start doing :) If I had started it, it probably would have been JPA, but I didn't because I'm a slacker. Since someone else did go for it, that's how it is.

The JRuby community would certainly welcome with open arms someone creating a similar ActiveJPA :)

Daniel Berger sa...

External XML config files! Woohoo!

Anonym sa...

Matthieu: please expound on what exactly you mean by "lot of compatibility issues".

Charles: He said "OpenJPA", not "JPA". It's a big difference. While I'm sure OpenJPA is a good product and all, the "why didn't you use XYZ instead" comments really should be ignored unless they come with some objective discussion.

I'm thinking I'm sensing FUD, or some sort of religiosity at work. Apache, BSD, and GPL style licenses all have their excellent *objective* uses. Full disclosure, as a developer I tend to prefer GPL/LGPL, but that's just me. I happen to like the restrictions on other people's use of my hard work.

And hurray! Sounds like a great project! I'll definitely be keeping a close eye on it if it stays JPA standard-based and/or Hibernate-based. JPA being preferable because it's somewhat interchangeable, but close runner up to Hibernate because it's mature and influential.

Anonym sa...

Charles: Fair answer, I guess I'm a slacker as well :) Let me just rephrase my comment that was badly formulated: did you think of OpenJPA? You might want to have a look, it's also a great tool following the JPA standard closely.

Marcus: I don't want to start any licensing debate, it's just a fact that a GPL work can reuse an ASL work but not the contrary. And for disclosure I'm an ASF committer (chair for Apache ODE, if you'd like to check the project, it's a nice one too ;) ).

johan andries sa...

matthieu: i've chosen Hibernate because 1. it has user collection types and an extension concept named tuplizer, which made it possible to persist RubyObjects directly without any tricks or changes to Hibernate code, and 2. at the start I was hoping for a simple port to NHibernate/IronRuby. (But I'm afraid that will not go so easy.)

Does OpenJPA have the same extension possibilities as Hibernate? (I didn't look that hard at it, honestly.)

Patrick Linskey sa...

> it has user collection types

What does this mean eaxctly? Does this just mean that you can use your own collection types, or something else?

OpenJPA directly supports any collection types, as long as they obey the Collection contract (basically, as long as they have a no-args constructor). If your collection types don't do this, you can still support them, but it requires a bit of coding ( < 50 lines).

> and an extension concept named tuplizer

Can you describe what this does?

In any event, I'd definitely encourage you to consider using the JPA APIs where possible, and then using vendor-specific APIs only as necessary. Generally-speaking, that approach will make it as easy as possible for you to support multiple vendors.

-Patrick