This post originated from an RSS feed registered with Java Buzz
by Norman Richards.
Original Post: Just say no to Active Record
Feed Title: Orb [norman richards]
Feed URL: http://members.capmac.org/~orb/blog.cgi/tech/java?flav=rss
Feed Description: Monkey number 312,978,199
I almost missed Bruce's suggestion that Java needs Active Record. (thanks) I try to be fairly silent on Rails since it is easy for people to confuse my personal opinions with bias based on my employer. Although I love Ruby, I'm quite unimpressed by rails; however, I do regularly drool over the testing capabilities of Rails. If there's anything we in the Java community need to copy, that is it.
One thing we don't need to copy is Active Record. If we need to learn anything from it, it is that it is not a very good way to do persistence. While it is functional enough for a small application, its warts quickly grow apparent. Active Record has persistence completely backwards. Perhaps I'll blog in detail when I have the patience to be more constructive in my criticisms. If I were doing a project in Ruby, I'd be much more likely to consider Og. (see nitro) I've not used it, so it is possible that it has just as many warts as Active Record. But, at the very least it seems to take a more practical approach to persistence.
There's a lot we in Java-land can learn from Rails. Although most of the Rails-inspired Java stuff has failed to capture what is truly interesting in Rails, even the least inspired scaffolding-clone at least provides some nominal value to Java developers. However, the weaker, backwards Active Record model has nothing to offer Java developers.