FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » ORMs comparisons/complaints.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: ORMs comparisons/complaints. [message #184328 is a reply to message #184311] Mon, 23 December 2013 13:22 Go to previous messageGo to previous message
leif.roar is currently offline  leif.roar
Messages: 1
Registered: December 2013
Karma:
Junior Member
In comp.lang.java.programmer Daniel Pitts <newsgroup(dot)nospam(at)virtualinfinity(dot)net> wrote:
>
> So, my question to the groups, what ORMs have you used, and what did you
> like and hate about each of them? I'm not trying to start a flame war,
> so please keep it to personal experiences with projects which used them.

I've worked with Hibernate / JPA and plain old SQL, and for my purposes
(business/process-driven web applications) they're a wash. Both are painful
in their own way, and I can't say I prefer either over the other.

Hibernate takes the pain out of managing the differences in SQL dialects
between various databases, and makes it quick to map data from the
relational tables into your domain objects. On the bad side, you end up
with "one view and one view only" of your data -- trying to represent
the data in a table in two different ways depending on use is a real
pain with Hibernate. You also often end up having to write mapping code
for your data _anyway_, as you might want to map your domain objects
into transfer objects to keep your database model from leaking out
into the display layer or elsewhere.

One annoyance with Hibernate is that you can't easily specify how much of
your object graph you want a query to cover, so you end up having to
keep your database transactions open across the whole of the business
process step, as Hibernate doesn't know what to retrieve until it's
actually used.

Perhaps most dangerously, Hibernate insulates the developers from the
database and keeps them from getting necessary understanding and
experience with it. You easily end up with developers who has learnt
to muddle along using Hibernate, but doesn't really understand what's
happening beneath it. That wouldn't be a problem if Hibernate let you
do 100% of what you needed to do, but in my experience you usually
end up with 5-10% of the database access being ill suited to Hibernate.

Plain SQL is a pain because you have to write all your own data mapping
code, which is error-prone and end up being more work than you thought --
and then you have to manage all the relationships between data in different
tables yourself.

The JDBC API is also really, really bad, but you can escape much of
that pain by using a helper like JDBC Template or similar.

--
Leif Roar Moldskred
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: tracking file usage
Next Topic: Processing accented characters submitted from forms
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 22:25:57 GMT 2024

Total time taken to generate the page: 0.04932 seconds