Re: News from Webobjecs sessions
Re: News from Webobjecs sessions
- Subject: Re: News from Webobjecs sessions
- From: Pierre Bernard <email@hidden>
- Date: Fri, 15 Jun 2007 22:20:12 -0700
Beware of Hibernate!
* You cannot write clean code that ages well: you mix model
information, java code and SQL in one file. The compiler cannot
validate HQL/SQL
* No way to query the model. Thus no fancy stuff like D2W is possible
* No transactions !!! You must add Spring to get transactions. To bad
Spring and Hibernate come from 2 competing groups.
* Validation does not work. E.g. you cannot trip a relationship while
doing validation
* Implementing your own validation is close to impossible as there is
no editing context keeping track of modified objects
* No object uniqueing!!!! This clearly shows that this was not meant
as ORM but as SQL generator
* _Relying_ on aspect oriented programming for production is just
bad. There is no way to predict what is going to happen
Add to that the "Hibernate experts" I had the pleasure to meet. They
will come in droves to claim funny (read tragic) stuff:
* Business objects must be lightweight. So we should not put business
code in there. That belongs into the UI
* MVC is for the UI layer only!
BTW, I have no trouble handling large amounts of data with EOF. It is
just a matter of choosing the adequate strategies and tools.
Pierre Bernard
Houdah Software s.à r.l.
P.S: KVC is pretty easy to implement yourself using Java reflection
On Jun 15, 2007, at 8:16 PM, Dov Rosenberg wrote:
So far I have to agree with your assessment regarding the
differences. While
we are still pretty early on in learning Hibernate and we have
never used
any previous version than the current release. Here are some things
that we
have found to be actually pretty cool about Hibernate:
* EOF and most Object relation tools tend to have a lot of issues
dealing
with bulk operations. ORM tools in general like to create Objects
by the
jillions. EOF allows you to do things like RawRows but you are
still dealing
with large amounts of data. Hibernate allows you to deal with
server side
cursors and have much finer grained control over the transaction.
* We can mix SQL and hibernate syntax in the same statement - while
that
sounds bad it provides us with a great deal of flexibility in
working with a
complex data model.
* The reliance on external caching mechanisms that can be
configured via
property files is pretty nice. EOF shields a lot of what is going
on and
being cached making it difficult to keep things in sync if and when
changes
are made outside of our application. Short of invalidating objects
after
everyuse we have had to rely on a JMS based change notification
(which we
borrowed and modified from Wonder) to clear our caches.
* There is an extensive set of Qualifiers
Things I don't like about Hibernate:
* No centralized place to see the entire model. We use annotations
which
leave all of the model information in the code.
* The syntax for creating qualifiers is not as elegant as EOF
* No key value coding
Overall Hibernate has a steep learning curve but once you get past
the fact
that it isn't EOF it isn't too bad
Dov
On 6/15/07 6:56 PM, "Pierre Bernard" <email@hidden>
wrote:
We have been seriously investigating Hibernate.
No matter where in the world you are now. You might have heard me
crying!
I had the "pleasure" to be involved in a Hibernate project. I
wouldn't know where to start criticizing this whatever you want to
call it. I actually purged much of my memory on this experience as to
keep my mental sanity.
Hibernate is a joke of a pile of crap! It is by no means a
persistence framework. You might at best call it a SQL generator. No
validation, no object graph management, makes you have SQL-like
Strings in your Java code, ...
Pierre
- - -
Houdah Software s. à r. l.
http://www.houdah.com
HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend
- - -
Houdah Software s. à r. l.
http://www.houdah.com
HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden