An Easier Java ORM(1)

http://www.javalobby.org/articles/activeobjects/の日本語訳です。
目次に戻る - An Easier Java ORM(2) 教訓をJavaに活かす >>

以下本文

JavaにはObject Relational Mappingフレームワークが溢れています。もちろん、最初にHibernateを思いつきますが、iBatisやBeankeeper等もリストの上位に入るでしょう。つまり、ORMには事欠きません。しかし、どのORMもいくつかの重要な欠点があるように見えます。

Java is absolutely full of Object Relational Mapping frameworks. Obviously Hibernate is the first which comes to mind, but also high on the list would be the likes of iBatis, Beankeeper, etc. In short, there is no shortage of ORMs. However, they all seem to suffer from one of a number of fundamental flaws:

  • 複雑すぎて使いづらい。
  • 遅くて高負荷な開発には適さない
  • 一部のデータベースとしか互換性を持たない。
  • They're complicated and hard to use
  • They're slow and unsuitable for high-load deployment
  • They're only compatible with a small handful of databases

実際、ほとんどのORMが一番目の問題にあてはまります。つまり、とても複雑なのです。ゼロからHibernateのプロジェクトを設定しようとしたときのことを思い出してみてください。コードよりもたくさんのXMLを書く必要がありますね!iBatisでは少し簡単にかもしれませんが、それでも手動の設定をたくさん必要な点が頭痛の種です。こういった頭痛の種の多くをフレームワークの自動化により取り除くことができれば、嬉しいでしょう。

Most ORMs actually match the first problem: they're just too darn complicated. Think about it, when's the last time you tried to configure a Hibernate project from scratch? You have to write more XML than code! iBatis makes things a bit easier at times, but you still have to run through a ton of manual configuration and headache. It would be nice if the framework could just automate most of this annoyance away. However, it seems very few frameworks these days put the proper emphasis on "ease of use" and low learning curve.

理解するための例
The Example to Follow