Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx23.iad.POSTED!not-for-mail From: Arved Sandstrom User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer,comp.lang.php Subject: Re: ORMs comparisons/complaints. References: <%JGtu.29103$Wm1.26832@fx17.iad> In-Reply-To: <%JGtu.29103$Wm1.26832@fx17.iad> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 82 Message-ID: X-Complaints-To: abuse@newsgroups-download.com NNTP-Posting-Date: Wed, 25 Dec 2013 17:56:09 UTC Organization: Public Usenet Newsgroup Access Date: Wed, 25 Dec 2013 13:56:09 -0400 X-Received-Bytes: 4194 X-Received-Body-CRC: 2057441354 Xref: csiph.com comp.lang.java.programmer:27083 comp.lang.php:12384 On 12/22/2013 03:05 PM, Daniel Pitts wrote: > Hey everyone, > > This is cross-posted to cl.java.programmer and cl.php. > > I've been doing some thinking about my experiences with various ORMs, > both positive and negative. I find that I often stretch systems to > there limits, and end up doing a lot of meta-programming to solve > problems that I've always felt should have been solved by the core > libraries. Mostly to follow DRY and KISS principals in the core > business code. > > I'm curious if others' have found the same things I have, or if they've > been satisfied doing things other ways, and if so what ORMs they use. > > I've had experience with the following Java ORMs: > * Hibernate (version 3, using Annotations for instance) > * Ibatis (many years ago, don't remember the version. around 2006) > * Straight JDBC. Not exactly an ORM :-) > > And then one non-Java ORM: Doctrine, which is modeled after Hibernate, > including most of its flaws, but missing some of its features. > > > 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'm interested in use-cases from simple small one-off applications to > complex enterprise-level systems, and highly-scalable systems. > > Please include details like "it's easier to maintain type of changes > with our approach, but is very difficult" etc... > > Thanks for your consideration, > Daniel. Java ORMs: Hibernate - but not recently, and even when I used it last mostly in its first JPA incarnation, and not much. Last use of native Hibernate many years ago; Straight JDBC - still quite a lot. Not an ORM, as you say; iBatis/MyBatis - a fair bit; TopLink/TopLink Essentials (TLE)/EclipseLink - a lot. Native for first two + JPA, JPA through EclipseLink. My ideas about ORMs have been informed a fair bit by using them in other languages, so although I won't blur the issue by mentioning them, their use will influence my opinions. *Industry* use of the various Java ORMs above: native Hibernate a long time ago, Hibernate JPA just a little, native TopLink a long time ago, TLE and EclipseLink a great deal for JPA. Non-ORM: straight JDBC a lot and since it got invented. I prefer JPA as an ORM API. I have no strong thoughts on Hibernate JPA versus EclipseLink JPA...I had to settle on one and chose TLE/EclipseLink. I have investigated JDO - it is more general than JPA insofar as it doesn't require a RDBMS datastore - but no industry projects I've been involved with (in 15 years or more) have been anything but RDBMS. JPA disadvantages (IMHO): relatively high bar to entry...not that simple to use well, and especially now with JPA 2 so many features that a novice can get discombobulated: IOW, not simple. JPA advantages: pretty much the reverse of the immediate above - efficient and powerful if you know what you are doing. "Knowing what you are doing" means not relying on IDEs, understanding lifetimes, and knowing what features you should not usually use. If I had to not use JPA I'd use straight JDBC, and do. AHS -- When a true genius appears, you can know him by this sign: that all the dunces are in a confederacy against him. -- Jonathan Swift