<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ORMs are a thing of the past</title>
	<atom:link href="http://codemonkeyism.com/orms/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkeyism.com/orms/</link>
	<description></description>
	<lastBuildDate>Mon, 15 Mar 2010 13:03:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Janez</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-268837</link>
		<dc:creator>Janez</dc:creator>
		<pubDate>Mon, 01 Feb 2010 19:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-268837</guid>
		<description>Hi there,

I&#039;ve spent the last 4 years developing Lotus Domino applications - most of this time I worked on legacy applications.

And I have to say that most of you people will be hugely disappointed by the NOSQL world (Domino is one of the Original NOSQL database systems :)).

Why? Because in NOSQL databases schema is implicit and hugely dependent on context. Meaning that when you work on data that is 10 years old and that had schema changed 10 times in between can be HUGE PITA!

I have learned though that &quot;schema&quot; (although implicit) should always be well documented - especially the transitions between them.

When you sift through this kind of data and start getting &quot;errors&quot; like date fields with prosaic values, you realize how important it is to keep track of your design :).

What I&#039;m trying to get across is: There is no silver bullets. If RDBMS doesn&#039;t cut it for you then neither ORM neither NOSQL wont. 

Yes there are problems out there that are more suited for this type of DB than the other.

BUT! There is no substitution for discipline, getting your basics straight and for developers having an good ol&#039; experienced DBA behind their necks.

I believe ORM&#039;s are great for prototyping, maybe some smaller stuff - and that&#039;s it. Its not that they wouldn&#039;t be able to &quot;get it done&quot;. Its just that when shit hits the fan - you really won&#039;t know how to help yourself out.

And cocky young developers (who don&#039;t believe DBA&#039;s) have a tendency to do just that! :)</description>
		<content:encoded><![CDATA[<p>Hi there,</p>
<p>I&#8217;ve spent the last 4 years developing Lotus Domino applications &#8211; most of this time I worked on legacy applications.</p>
<p>And I have to say that most of you people will be hugely disappointed by the NOSQL world (Domino is one of the Original NOSQL database systems :)).</p>
<p>Why? Because in NOSQL databases schema is implicit and hugely dependent on context. Meaning that when you work on data that is 10 years old and that had schema changed 10 times in between can be HUGE PITA!</p>
<p>I have learned though that &#8220;schema&#8221; (although implicit) should always be well documented &#8211; especially the transitions between them.</p>
<p>When you sift through this kind of data and start getting &#8220;errors&#8221; like date fields with prosaic values, you realize how important it is to keep track of your design :).</p>
<p>What I&#8217;m trying to get across is: There is no silver bullets. If RDBMS doesn&#8217;t cut it for you then neither ORM neither NOSQL wont. </p>
<p>Yes there are problems out there that are more suited for this type of DB than the other.</p>
<p>BUT! There is no substitution for discipline, getting your basics straight and for developers having an good ol&#8217; experienced DBA behind their necks.</p>
<p>I believe ORM&#8217;s are great for prototyping, maybe some smaller stuff &#8211; and that&#8217;s it. Its not that they wouldn&#8217;t be able to &#8220;get it done&#8221;. Its just that when shit hits the fan &#8211; you really won&#8217;t know how to help yourself out.</p>
<p>And cocky young developers (who don&#8217;t believe DBA&#8217;s) have a tendency to do just that! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-268787</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Mon, 01 Feb 2010 16:13:12 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-268787</guid>
		<description>@Roy: The problem arises because ORMs are a leaky abstraction, they want to make something complex simple. In the process something is lost, and the question is: was the lost thing essential or not.

&quot;There is nothing wrong with the mapping part.&quot;

Then you don&#039;t need use an ORM, iBatis or another simple mapper is sufficient.

People use ORMs because it transparently handles associations and generates all queries. The mapping part is the simple one.

With &lt;code&gt;rowMap&lt;/code&gt; in Spring JDBC one gets a lot of things.</description>
		<content:encoded><![CDATA[<p>@Roy: The problem arises because ORMs are a leaky abstraction, they want to make something complex simple. In the process something is lost, and the question is: was the lost thing essential or not.</p>
<p>&#8220;There is nothing wrong with the mapping part.&#8221;</p>
<p>Then you don&#8217;t need use an ORM, iBatis or another simple mapper is sufficient.</p>
<p>People use ORMs because it transparently handles associations and generates all queries. The mapping part is the simple one.</p>
<p>With <code>rowMap</code> in Spring JDBC one gets a lot of things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy van Rijn</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-268780</link>
		<dc:creator>Roy van Rijn</dc:creator>
		<pubDate>Mon, 01 Feb 2010 15:32:19 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-268780</guid>
		<description>I&#039;m not sure about this article.

The way you put it is coloured and when reading I thought you where completely right. But then I started to think about the alternatives.

When you are using Spring JDBC you have to write your own SQL and do the mapping yourself. This will prevent much of the N+1 mistakes, sure. But why does it prevent these mistakes: Because we are writing SQL again.

The problem doesn&#039;t come with the ORM as mapper, the problem is that people let the ORM-framework come up with queries! We need to write the queries ourself! There is nothing wrong with the mapping part.

IMHO it would be best if we had ORM mappers that take SQL queries and maps the results to objects. Then the people who still understand SQL could write the queries, and the resulting objects can be used throughout the program.

ORM isn&#039;t a thing of the past, SQL-generation might be.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure about this article.</p>
<p>The way you put it is coloured and when reading I thought you where completely right. But then I started to think about the alternatives.</p>
<p>When you are using Spring JDBC you have to write your own SQL and do the mapping yourself. This will prevent much of the N+1 mistakes, sure. But why does it prevent these mistakes: Because we are writing SQL again.</p>
<p>The problem doesn&#8217;t come with the ORM as mapper, the problem is that people let the ORM-framework come up with queries! We need to write the queries ourself! There is nothing wrong with the mapping part.</p>
<p>IMHO it would be best if we had ORM mappers that take SQL queries and maps the results to objects. Then the people who still understand SQL could write the queries, and the resulting objects can be used throughout the program.</p>
<p>ORM isn&#8217;t a thing of the past, SQL-generation might be.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: karl</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-266096</link>
		<dc:creator>karl</dc:creator>
		<pubDate>Tue, 19 Jan 2010 09:39:51 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-266096</guid>
		<description>I use JDBC + memcached</description>
		<content:encoded><![CDATA[<p>I use JDBC + memcached</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: beefarino</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-256807</link>
		<dc:creator>beefarino</dc:creator>
		<pubDate>Wed, 09 Dec 2009 03:57:50 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-256807</guid>
		<description>Good post.  I know several other smart people who are starting to feel the same way.

The other day I heard one of them say, &quot;I used NHibernate to solve a problem.  Now I have two problems.&quot;</description>
		<content:encoded><![CDATA[<p>Good post.  I know several other smart people who are starting to feel the same way.</p>
<p>The other day I heard one of them say, &#8220;I used NHibernate to solve a problem.  Now I have two problems.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-250841</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Tue, 03 Nov 2009 14:57:31 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-250841</guid>
		<description>Sounds like Hibernate would be good to slapping together a usable system using scaffolding and other quick-to-market stuff. But at some point, it would be nice for Hibernate to spill out the queries its using, and transform the solution into a fine-tunable iBatis solution. Any chance Hibernate could be patched to yield its secrets?</description>
		<content:encoded><![CDATA[<p>Sounds like Hibernate would be good to slapping together a usable system using scaffolding and other quick-to-market stuff. But at some point, it would be nice for Hibernate to spill out the queries its using, and transform the solution into a fine-tunable iBatis solution. Any chance Hibernate could be patched to yield its secrets?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Finzer</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-249625</link>
		<dc:creator>Greg Finzer</dc:creator>
		<pubDate>Wed, 28 Oct 2009 15:31:48 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-249625</guid>
		<description>I think ORMs are great.  I just don&#039;t care for the ones that are currently out there so I built my own ORM as a learning experience and to rectify the shortcommings of Hibernate.  Namely:

The ORM should be able to automatically map plural table names.
The ORM should have no mapping files and have default conventions that make sense.
The ORM should support standard ANSI SQL not some crazy variation.  
When an error occurs, not only should the SQL be displayed but also the parameters.  The SQL should be nicely formatted.
The ORM should detect when a field length is too long and display the field name and the text that was tried.

I wish Hibernate would do all that.</description>
		<content:encoded><![CDATA[<p>I think ORMs are great.  I just don&#8217;t care for the ones that are currently out there so I built my own ORM as a learning experience and to rectify the shortcommings of Hibernate.  Namely:</p>
<p>The ORM should be able to automatically map plural table names.<br />
The ORM should have no mapping files and have default conventions that make sense.<br />
The ORM should support standard ANSI SQL not some crazy variation.<br />
When an error occurs, not only should the SQL be displayed but also the parameters.  The SQL should be nicely formatted.<br />
The ORM should detect when a field length is too long and display the field name and the text that was tried.</p>
<p>I wish Hibernate would do all that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blog harvest, October II &#171; Schneide Blog</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-249166</link>
		<dc:creator>Blog harvest, October II &#171; Schneide Blog</dc:creator>
		<pubDate>Sun, 25 Oct 2009 19:39:33 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-249166</guid>
		<description>[...] ORMs are a thing of the past &#8211; Another opinion that might get in the way of hibernate fanboys. We&#8217;ve had our share of hibernate &#8220;experiences&#8221;. It&#8217;s a useful tool if you know how to use it &#8211; and when not to. Replies followed instantly, here are two noteworthy ones by Scot Mcphee and by Jens Schauder. [...]</description>
		<content:encoded><![CDATA[<p>[...] ORMs are a thing of the past &#8211; Another opinion that might get in the way of hibernate fanboys. We&#8217;ve had our share of hibernate &#8220;experiences&#8221;. It&#8217;s a useful tool if you know how to use it &#8211; and when not to. Replies followed instantly, here are two noteworthy ones by Scot Mcphee and by Jens Schauder. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RogerV</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-249113</link>
		<dc:creator>RogerV</dc:creator>
		<pubDate>Sat, 24 Oct 2009 19:07:08 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-249113</guid>
		<description>At one time as a developer I used Hibernate on some projects. Those went well because the primary interest was in data insertion. Hibernate made it dirt easy to insert an object graph generated from an XSD-described XML message (JAXB generated the classes that Hibernate in turn persisted).

These days, a flagship product that is heavy on full range of database interactions (especially query) is using iBATIS. We&#039;re finding iBATIS strikes a pretty good balance. We hand write the SQL (and often call stored procedures), but iBATIS assist with the tedium of mapping inputs and result sets to Java objects. It also nicely integrates with Spring Framework, where Spring is the bean factory facility for BlazeDS services, DAOs, iBATIS, and JMS message processing beans.

iBATIS is a good way forward for large scale projects that don&#039;t want to compromise on the SQL layer that is used.</description>
		<content:encoded><![CDATA[<p>At one time as a developer I used Hibernate on some projects. Those went well because the primary interest was in data insertion. Hibernate made it dirt easy to insert an object graph generated from an XSD-described XML message (JAXB generated the classes that Hibernate in turn persisted).</p>
<p>These days, a flagship product that is heavy on full range of database interactions (especially query) is using iBATIS. We&#8217;re finding iBATIS strikes a pretty good balance. We hand write the SQL (and often call stored procedures), but iBATIS assist with the tedium of mapping inputs and result sets to Java objects. It also nicely integrates with Spring Framework, where Spring is the bean factory facility for BlazeDS services, DAOs, iBATIS, and JMS message processing beans.</p>
<p>iBATIS is a good way forward for large scale projects that don&#8217;t want to compromise on the SQL layer that is used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bjarne Saebaeck</title>
		<link>http://codemonkeyism.com/orms/comment-page-3/#comment-249091</link>
		<dc:creator>Bjarne Saebaeck</dc:creator>
		<pubDate>Sat, 24 Oct 2009 11:29:26 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-249091</guid>
		<description>I fully agree with Marcos: Developers always  have to know how the tools or technologies work they want or are told to use. That of course is true for Hibernate or JPA but also for SQL.</description>
		<content:encoded><![CDATA[<p>I fully agree with Marcos: Developers always  have to know how the tools or technologies work they want or are told to use. That of course is true for Hibernate or JPA but also for SQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcos Silva Pereira</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248619</link>
		<dc:creator>Marcos Silva Pereira</dc:creator>
		<pubDate>Mon, 19 Oct 2009 22:05:25 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248619</guid>
		<description>Let me see if I understand that: because bad developers don&#039;t know how to use the tools (ORMs), you are judging them - the tools - as thing of the past. Because bad developers don&#039;t know when to use the right tool for the job, you are judging them - the tools - as thing of the past. 

Well, here are the news: bad developers will mess up ANY tool that you can imagine. Anyway, thanks for the provocative text, but I was expecting some alternatives instead of just negative comments.

Kind Regards</description>
		<content:encoded><![CDATA[<p>Let me see if I understand that: because bad developers don&#8217;t know how to use the tools (ORMs), you are judging them &#8211; the tools &#8211; as thing of the past. Because bad developers don&#8217;t know when to use the right tool for the job, you are judging them &#8211; the tools &#8211; as thing of the past. </p>
<p>Well, here are the news: bad developers will mess up ANY tool that you can imagine. Anyway, thanks for the provocative text, but I was expecting some alternatives instead of just negative comments.</p>
<p>Kind Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomi Tuomainen</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248613</link>
		<dc:creator>Tomi Tuomainen</dc:creator>
		<pubDate>Mon, 19 Oct 2009 21:04:35 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248613</guid>
		<description>I just blogged about the same thing: 

http://blog.devtrain.fi/2009/10/18/kauklahti-making-orm-simple

My solution is simple extension to  JdbcTemplate to support joins and CRUD generation for class hierarchy. Also ResultSet extraction into objects is provided.</description>
		<content:encoded><![CDATA[<p>I just blogged about the same thing: </p>
<p><a href="http://blog.devtrain.fi/2009/10/18/kauklahti-making-orm-simple" rel="nofollow">http://blog.devtrain.fi/2009/10/18/kauklahti-making-orm-simple</a></p>
<p>My solution is simple extension to  JdbcTemplate to support joins and CRUD generation for class hierarchy. Also ResultSet extraction into objects is provided.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven P. Goldsmith</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248609</link>
		<dc:creator>Steven P. Goldsmith</dc:creator>
		<pubDate>Mon, 19 Oct 2009 20:05:51 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248609</guid>
		<description>We use meta programming to generate DTOs and DAOs with a single DAO based on Java generics. If the underlying data model changes we can simple regenerate the code. One nice thing is since we use templates we can use any technology we choose. We also generate the meta file :) We can generate composite DAOs which are handy for legacy data models.


    ../genericdaotest/src
    jsmith
    jsmith@smith.com
    dto.vm
    dao.vm
    applicationContext.vm

    
        
            select tripid, carrentalid, provider, city, pickupdate, returndate, cartype, rate, bookingstatus, lastupdated from carrental limit 1
        
        
            select tripid, carrentalid, provider, city, pickupdate, returndate, cartype, rate, bookingstatus, lastupdated from carrental where carrentalid = :carrentalid
            insert into carrental (tripid, carrentalid, provider, city, pickupdate, returndate, cartype, rate, bookingstatus, lastupdated) values(:tripid, :carrentalid, :provider, :city, :pickupdate, :returndate, :cartype, :rate, :bookingstatus, :lastupdated)
            update carrental set tripid = :tripid, carrentalid = :carrentalid, provider = :provider, city = :city, pickupdate = :pickupdate, returndate = :returndate, cartype = :cartype, rate = :rate, bookingstatus = :bookingstatus, lastupdated = :lastupdated where carrentalid = :carrentalid
            delete from carrental where carrentalid = :carrentalid
        
    </description>
		<content:encoded><![CDATA[<p>We use meta programming to generate DTOs and DAOs with a single DAO based on Java generics. If the underlying data model changes we can simple regenerate the code. One nice thing is since we use templates we can use any technology we choose. We also generate the meta file :) We can generate composite DAOs which are handy for legacy data models.</p>
<p>    ../genericdaotest/src<br />
    jsmith<br />
    <a href="mailto:jsmith@smith.com">jsmith@smith.com</a><br />
    dto.vm<br />
    dao.vm<br />
    applicationContext.vm</p>
<p>            select tripid, carrentalid, provider, city, pickupdate, returndate, cartype, rate, bookingstatus, lastupdated from carrental limit 1</p>
<p>            select tripid, carrentalid, provider, city, pickupdate, returndate, cartype, rate, bookingstatus, lastupdated from carrental where carrentalid = :carrentalid<br />
            insert into carrental (tripid, carrentalid, provider, city, pickupdate, returndate, cartype, rate, bookingstatus, lastupdated) values(:tripid, :carrentalid, :provider, :city, :pickupdate, :returndate, :cartype, :rate, :bookingstatus, :lastupdated)<br />
            update carrental set tripid = :tripid, carrentalid = :carrentalid, provider = :provider, city = :city, pickupdate = :pickupdate, returndate = :returndate, cartype = :cartype, rate = :rate, bookingstatus = :bookingstatus, lastupdated = :lastupdated where carrentalid = :carrentalid<br />
            delete from carrental where carrentalid = :carrentalid</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Peterbauer</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248608</link>
		<dc:creator>Karl Peterbauer</dc:creator>
		<pubDate>Mon, 19 Oct 2009 20:01:44 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248608</guid>
		<description>Two arguments pro ORM/JPA: JPA queries are sweet and compact, much easier to read/debug/maintain than standard SQL (no foreign key constraints, some nice extensions). And they try hard to scrape off the rough edges of the different SQL dialects. Don&#039;t talk to the driver directly if you want to have a minimal chance of switching databases...</description>
		<content:encoded><![CDATA[<p>Two arguments pro ORM/JPA: JPA queries are sweet and compact, much easier to read/debug/maintain than standard SQL (no foreign key constraints, some nice extensions). And they try hard to scrape off the rough edges of the different SQL dialects. Don&#8217;t talk to the driver directly if you want to have a minimal chance of switching databases&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jordan Zimmerman</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248590</link>
		<dc:creator>Jordan Zimmerman</dc:creator>
		<pubDate>Mon, 19 Oct 2009 16:46:33 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248590</guid>
		<description>Replace the term ORM in your post with Hibernate and I agree with you. Hibernate is a terrible approach. Have you looked at iBatis? It is the best way to do ORM.</description>
		<content:encoded><![CDATA[<p>Replace the term ORM in your post with Hibernate and I agree with you. Hibernate is a terrible approach. Have you looked at iBatis? It is the best way to do ORM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gernot Kogler</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248589</link>
		<dc:creator>Gernot Kogler</dc:creator>
		<pubDate>Mon, 19 Oct 2009 16:03:40 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248589</guid>
		<description>I helped designing and writing an ORM that is still used in a very large product (Hibernate wasn&#039;t born then), wrote another one later for my own purposes and have used (n)Hibernate in several projects.

Then I tried Rails 3 years ago and now I&#039;m absolutely in love with ActiveRecord. Paired with the power of ruby there&#039;s no way I would write my own DAO again (or use another platform - hehe). If properly used, it generates SQL that could hardly be written better &quot;by hand&quot;.</description>
		<content:encoded><![CDATA[<p>I helped designing and writing an ORM that is still used in a very large product (Hibernate wasn&#8217;t born then), wrote another one later for my own purposes and have used (n)Hibernate in several projects.</p>
<p>Then I tried Rails 3 years ago and now I&#8217;m absolutely in love with ActiveRecord. Paired with the power of ruby there&#8217;s no way I would write my own DAO again (or use another platform &#8211; hehe). If properly used, it generates SQL that could hardly be written better &#8220;by hand&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cedric</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248587</link>
		<dc:creator>Cedric</dc:creator>
		<pubDate>Mon, 19 Oct 2009 15:49:27 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248587</guid>
		<description>Stephan,

In this particular case, I see &quot;hard to change&quot; as a feature. When you change a type in an existing schema (something that&#039;s pretty rare, to be honest), you have to do some extra work in order to give the database as much information as possible.  In return, you get static safety, optimized queries and many other features that we have learned over the past decades in the RDBMS world.

Consider this analogy:  in a Java program where all the objects are of type Object, changes are very easy to make, but you will most certainly break a lot of code doing so.

-- 
Cedric</description>
		<content:encoded><![CDATA[<p>Stephan,</p>
<p>In this particular case, I see &#8220;hard to change&#8221; as a feature. When you change a type in an existing schema (something that&#8217;s pretty rare, to be honest), you have to do some extra work in order to give the database as much information as possible.  In return, you get static safety, optimized queries and many other features that we have learned over the past decades in the RDBMS world.</p>
<p>Consider this analogy:  in a Java program where all the objects are of type Object, changes are very easy to make, but you will most certainly break a lot of code doing so.</p>
<p>&#8211;<br />
Cedric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248575</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Mon, 19 Oct 2009 14:05:52 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248575</guid>
		<description>@Sena: I like them did some work with OO databases at the university, I think they never gained traction because they are hard to integrate and hard to use for reporting. 

Basically everything written here:

http://codemonkeyism.com/dark-side-nosql/

applies to them.</description>
		<content:encoded><![CDATA[<p>@Sena: I like them did some work with OO databases at the university, I think they never gained traction because they are hard to integrate and hard to use for reporting. </p>
<p>Basically everything written here:</p>
<p><a href="http://codemonkeyism.com/dark-side-nosql/" rel="nofollow">http://codemonkeyism.com/dark-side-nosql/</a></p>
<p>applies to them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sena Gbeckor-Kove</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248571</link>
		<dc:creator>Sena Gbeckor-Kove</dc:creator>
		<pubDate>Mon, 19 Oct 2009 13:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248571</guid>
		<description>Ho do you feel about pure object databases?</description>
		<content:encoded><![CDATA[<p>Ho do you feel about pure object databases?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Remco</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248570</link>
		<dc:creator>Remco</dc:creator>
		<pubDate>Mon, 19 Oct 2009 13:51:38 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248570</guid>
		<description>I don&#039;t like ORM&#039;s (like Hibernate/JPA/JDO) either. 
But the current alternatives also have flaws (Spring JDBC, iBatis, AR).

Sometimes I think we need something completely different. Should relational data be &quot;mapped&quot; to objects? What would a relational domain model look like?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t like ORM&#8217;s (like Hibernate/JPA/JDO) either.<br />
But the current alternatives also have flaws (Spring JDBC, iBatis, AR).</p>
<p>Sometimes I think we need something completely different. Should relational data be &#8220;mapped&#8221; to objects? What would a relational domain model look like?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek Martin</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248497</link>
		<dc:creator>Derek Martin</dc:creator>
		<pubDate>Sun, 18 Oct 2009 22:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248497</guid>
		<description>I&#039;m a big fan of the Propel ORM for PHP5. It generates 2 sets of classes from the schema: base &amp; implementation.

Base: extended by the implementation classes. Contain all the getters &amp; setters, which you are free to override in the implementation classes. You never modify the Base classes directly. They are always fully auto-generated. If you want, you can even customize the class that generates the Base classes, so they all have the same customized core functionality.

Implementation: allows you to customize the getter/setter for any property, and to add your own for virtual properties, etc. The Implementation objects are also host to your save &amp; delete methods. Implementation classes are not regenerated/overwritten when you regenerate the Base classes due to a schema change.

As for selecting data from the database, this is where Propel starts to shine. It actually generates another class for each table called a &quot;Peer&quot;. They are essentially containers for static methods for fetching rows of that table. They come with a few built-in queries, which you can add to. Example: 
PersonPeer::retrieveByPk(42);

You can also select using &quot;Criteria&quot; objects. 
Example:
$c = new Criteria();
$c-&gt;add(PersonPeer::FIRST_NAME, &#039;Derek&#039;);
$people = PersonPeer::doSelect($c);

You can also select using straight-up SQL if you like, and then populate your Implementation objects from the result set. Although you lose database portability by doing this (versus Criteria), you gain the benefit of having very straightforward easy-to-read queries.

Altogether, it gives you quite a flexible abstraction layer, which has helped me out of more than just one or two tricky situations.

For example, I&#039;ve customized the Peer objects so that they automatically cache my result sets, and the Implementation objects so that they automatically save the History of all object changes.</description>
		<content:encoded><![CDATA[<p>I&#8217;m a big fan of the Propel ORM for PHP5. It generates 2 sets of classes from the schema: base &amp; implementation.</p>
<p>Base: extended by the implementation classes. Contain all the getters &amp; setters, which you are free to override in the implementation classes. You never modify the Base classes directly. They are always fully auto-generated. If you want, you can even customize the class that generates the Base classes, so they all have the same customized core functionality.</p>
<p>Implementation: allows you to customize the getter/setter for any property, and to add your own for virtual properties, etc. The Implementation objects are also host to your save &amp; delete methods. Implementation classes are not regenerated/overwritten when you regenerate the Base classes due to a schema change.</p>
<p>As for selecting data from the database, this is where Propel starts to shine. It actually generates another class for each table called a &#8220;Peer&#8221;. They are essentially containers for static methods for fetching rows of that table. They come with a few built-in queries, which you can add to. Example:<br />
PersonPeer::retrieveByPk(42);</p>
<p>You can also select using &#8220;Criteria&#8221; objects.<br />
Example:<br />
$c = new Criteria();<br />
$c-&gt;add(PersonPeer::FIRST_NAME, &#8216;Derek&#8217;);<br />
$people = PersonPeer::doSelect($c);</p>
<p>You can also select using straight-up SQL if you like, and then populate your Implementation objects from the result set. Although you lose database portability by doing this (versus Criteria), you gain the benefit of having very straightforward easy-to-read queries.</p>
<p>Altogether, it gives you quite a flexible abstraction layer, which has helped me out of more than just one or two tricky situations.</p>
<p>For example, I&#8217;ve customized the Peer objects so that they automatically cache my result sets, and the Implementation objects so that they automatically save the History of all object changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucio Benfante</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248475</link>
		<dc:creator>Lucio Benfante</dc:creator>
		<pubDate>Sun, 18 Oct 2009 18:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248475</guid>
		<description>For me ORMs are necessary in any project which interact with a non-object database. Of course an ORM is complex, but you can hide most of it complexity behind a good DAO infrastructure.

Using Hibernate/JPA+Spring and some Java annotations I wrote the DAOs of the Parancoe meta-framework:

http://docs.parancoe.org/reference/html/persistence.html

Using these DAOs developers have a very little interaction with the ORM system: they only need to define the mapping, and the queries (using HQL or Criteria API), nothing else. They become productive immediately, and the possibilities of being wrong using the ORM are reduced at the minimum.</description>
		<content:encoded><![CDATA[<p>For me ORMs are necessary in any project which interact with a non-object database. Of course an ORM is complex, but you can hide most of it complexity behind a good DAO infrastructure.</p>
<p>Using Hibernate/JPA+Spring and some Java annotations I wrote the DAOs of the Parancoe meta-framework:</p>
<p><a href="http://docs.parancoe.org/reference/html/persistence.html" rel="nofollow">http://docs.parancoe.org/reference/html/persistence.html</a></p>
<p>Using these DAOs developers have a very little interaction with the ORM system: they only need to define the mapping, and the queries (using HQL or Criteria API), nothing else. They become productive immediately, and the possibilities of being wrong using the ORM are reduced at the minimum.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Schauderhaft &#187; Hibernate has Problems, but where is the Alternative?</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248472</link>
		<dc:creator>Schauderhaft &#187; Hibernate has Problems, but where is the Alternative?</dc:creator>
		<pubDate>Sun, 18 Oct 2009 17:53:40 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248472</guid>
		<description>[...] In a late blog post Stephan Schmidt vents his problems with hibernate and declares &#8220;ORMs are a thing of the past&#8220; [...]</description>
		<content:encoded><![CDATA[<p>[...] In a late blog post Stephan Schmidt vents his problems with hibernate and declares &#8220;ORMs are a thing of the past&#8220; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bubak</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248466</link>
		<dc:creator>bubak</dc:creator>
		<pubDate>Sun, 18 Oct 2009 15:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248466</guid>
		<description>I store everything in RAM and use serialization...</description>
		<content:encoded><![CDATA[<p>I store everything in RAM and use serialization&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerbrand van Dieijen</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248457</link>
		<dc:creator>Gerbrand van Dieijen</dc:creator>
		<pubDate>Sun, 18 Oct 2009 13:23:54 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248457</guid>
		<description>@stephan, I agree. Many problems can be solved in SQL a lot more elegantly (and easier) than in Java.
If you truly needs caching, object-identity management and fast time-to-marked, considering a object-database would be a lot better choice than an ORM framework.</description>
		<content:encoded><![CDATA[<p>@stephan, I agree. Many problems can be solved in SQL a lot more elegantly (and easier) than in Java.<br />
If you truly needs caching, object-identity management and fast time-to-marked, considering a object-database would be a lot better choice than an ORM framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248456</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sun, 18 Oct 2009 12:17:46 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248456</guid>
		<description>@Benjamin: Care to post the code?</description>
		<content:encoded><![CDATA[<p>@Benjamin: Care to post the code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjamin Darfler</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248454</link>
		<dc:creator>Benjamin Darfler</dc:creator>
		<pubDate>Sun, 18 Oct 2009 11:53:55 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248454</guid>
		<description>Here here, after spending 2 years working on a project where I, myself, convinced the team that Hibernate was the only option I have now worked on two separate projects and have chosen iBatis and most recently I have simply chosen Spring JDBC.  Taking some ideas from the ActiveObject api and using java.net&#039;s Inflector class I have created a simple genericized dao with all the benefits of type safety and all the simplicity of the rails naming convention.  Sure, you have to jump through some hoops to pull a huge object graph out of the database but that use case is fairly rare and with spring, dropping down to sql is simple and easy. Finally, developing in a modern IDE simple means creating a database object class, typing in a few fields and the ide generates all the getters, setters, toString, hashcode, and equals without you having to think.</description>
		<content:encoded><![CDATA[<p>Here here, after spending 2 years working on a project where I, myself, convinced the team that Hibernate was the only option I have now worked on two separate projects and have chosen iBatis and most recently I have simply chosen Spring JDBC.  Taking some ideas from the ActiveObject api and using java.net&#8217;s Inflector class I have created a simple genericized dao with all the benefits of type safety and all the simplicity of the rails naming convention.  Sure, you have to jump through some hoops to pull a huge object graph out of the database but that use case is fairly rare and with spring, dropping down to sql is simple and easy. Finally, developing in a modern IDE simple means creating a database object class, typing in a few fields and the ide generates all the getters, setters, toString, hashcode, and equals without you having to think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flow &#187; Blog Archive &#187; Daily Digest for October 18th - The zeitgeist daily</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248443</link>
		<dc:creator>Flow &#187; Blog Archive &#187; Daily Digest for October 18th - The zeitgeist daily</dc:creator>
		<pubDate>Sun, 18 Oct 2009 10:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248443</guid>
		<description>[...] Shared ORMs are a thing of the past. [...]</description>
		<content:encoded><![CDATA[<p>[...] Shared ORMs are a thing of the past. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andrevd</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248442</link>
		<dc:creator>andrevd</dc:creator>
		<pubDate>Sun, 18 Oct 2009 10:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248442</guid>
		<description>It is funny to see that NoSQL databases becoming in advance for now.

I&#039;ve been developing over three years with Lotus Domino / Lotus Notes platform with it&#039;s own databaseformat NSF which is a NoSQL database. Adding fields, sorting, data replication with many other instances of the database were such a charme. Our complete CRM was implemented as many databases in this hierarchical structure and it worked very fast on huge amount of records and data. Everything was documented in it even binary files (.doc, .xls, .ppt and so on).

The only &quot;problems&quot; we had were that we&#039;ve encountered a &quot;missing link&quot; with the &quot;classical&quot; business reporting systems which mostly do only support relational structures. And sadly with many consultants blaming that databases because of they only know relational ones. But if they had to change their tables (datatype migration, add one field, ...) there was a need to take their application offline. With the NSF database we just developed (using DAOs) in a testenvironment and deployed it to production. All changes were replicated automatically to other instances of the database.</description>
		<content:encoded><![CDATA[<p>It is funny to see that NoSQL databases becoming in advance for now.</p>
<p>I&#8217;ve been developing over three years with Lotus Domino / Lotus Notes platform with it&#8217;s own databaseformat NSF which is a NoSQL database. Adding fields, sorting, data replication with many other instances of the database were such a charme. Our complete CRM was implemented as many databases in this hierarchical structure and it worked very fast on huge amount of records and data. Everything was documented in it even binary files (.doc, .xls, .ppt and so on).</p>
<p>The only &#8220;problems&#8221; we had were that we&#8217;ve encountered a &#8220;missing link&#8221; with the &#8220;classical&#8221; business reporting systems which mostly do only support relational structures. And sadly with many consultants blaming that databases because of they only know relational ones. But if they had to change their tables (datatype migration, add one field, &#8230;) there was a need to take their application offline. With the NSF database we just developed (using DAOs) in a testenvironment and deployed it to production. All changes were replicated automatically to other instances of the database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248431</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sun, 18 Oct 2009 08:08:46 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248431</guid>
		<description>The biggest problem - for us - with static typed databases is that they are hard to change, and because we&#039;re not big enough, a schema change results in a web-downtime. With dynamic / schemaless databases the need would go away and we could better server our customers.

The downside is highly increased application code and logic, because you need to deal with NULL values.

From my experience though, over years NULL values also creep into RDBMS.</description>
		<content:encoded><![CDATA[<p>The biggest problem &#8211; for us &#8211; with static typed databases is that they are hard to change, and because we&#8217;re not big enough, a schema change results in a web-downtime. With dynamic / schemaless databases the need would go away and we could better server our customers.</p>
<p>The downside is highly increased application code and logic, because you need to deal with NULL values.</p>
<p>From my experience though, over years NULL values also creep into RDBMS.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248429</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sun, 18 Oct 2009 08:05:38 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248429</guid>
		<description>I&#039;ve heard it more and more that people prefer iBatis.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve heard it more and more that people prefer iBatis.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shantanu Kumar</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248423</link>
		<dc:creator>Shantanu Kumar</dc:creator>
		<pubDate>Sun, 18 Oct 2009 07:33:51 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248423</guid>
		<description>@Cedric

Bad code may not be a problem with ORM per se. The implementation framework should make it extra-hard to do it wrong, and should not hide details under three levels of abstraction within the framework itself (this is what people call &quot;magic&quot; [in a bad sense] when they do).

For example, Hibernate&#039;s Level-1 Object cache may be fine for some use-cases but in general, trading lazy-loading/sync&#039;ing for freedom from Level-1 blues appears to be a good balance. &quot;Hibernate Lite&quot;, anyone ?

Another gripe is with XML and annotations. Why not create DSL-like API for declaring entities and associations? (Think SQLAlchemy)</description>
		<content:encoded><![CDATA[<p>@Cedric</p>
<p>Bad code may not be a problem with ORM per se. The implementation framework should make it extra-hard to do it wrong, and should not hide details under three levels of abstraction within the framework itself (this is what people call &#8220;magic&#8221; [in a bad sense] when they do).</p>
<p>For example, Hibernate&#8217;s Level-1 Object cache may be fine for some use-cases but in general, trading lazy-loading/sync&#8217;ing for freedom from Level-1 blues appears to be a good balance. &#8220;Hibernate Lite&#8221;, anyone ?</p>
<p>Another gripe is with XML and annotations. Why not create DSL-like API for declaring entities and associations? (Think SQLAlchemy)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mironsadziak</title>
		<link>http://codemonkeyism.com/orms/comment-page-2/#comment-248417</link>
		<dc:creator>mironsadziak</dc:creator>
		<pubDate>Sun, 18 Oct 2009 06:14:04 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248417</guid>
		<description>Good article. But not all deficiencies explained here apply to all of ORM solutions. For instance OQM (Object-Query Mappers) like iBatis give much more control over the way you communicate with a database. Personally I prefer it for big projects, in connection with a good framework like Spring, which takes care of session and exception handling.</description>
		<content:encoded><![CDATA[<p>Good article. But not all deficiencies explained here apply to all of ORM solutions. For instance OQM (Object-Query Mappers) like iBatis give much more control over the way you communicate with a database. Personally I prefer it for big projects, in connection with a good framework like Spring, which takes care of session and exception handling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cedric</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248401</link>
		<dc:creator>Cedric</dc:creator>
		<pubDate>Sun, 18 Oct 2009 03:31:15 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248401</guid>
		<description>How timely: on the MongoDB blog, somebody just wrote that databases should be dynamically typed:

http://blog.mongodb.org/post/215738382/databases-should-be-dynamically-typed

Take a look at the comments on the blog post, and also on Hacker News:

http://news.ycombinator.com/item?id=887605

Sorry, but I&#039;m still not overly impressed with the alternatives so far...</description>
		<content:encoded><![CDATA[<p>How timely: on the MongoDB blog, somebody just wrote that databases should be dynamically typed:</p>
<p><a href="http://blog.mongodb.org/post/215738382/databases-should-be-dynamically-typed" rel="nofollow">http://blog.mongodb.org/post/215738382/databases-should-be-dynamically-typed</a></p>
<p>Take a look at the comments on the blog post, and also on Hacker News:</p>
<p><a href="http://news.ycombinator.com/item?id=887605" rel="nofollow">http://news.ycombinator.com/item?id=887605</a></p>
<p>Sorry, but I&#8217;m still not overly impressed with the alternatives so far&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cedric</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248391</link>
		<dc:creator>Cedric</dc:creator>
		<pubDate>Sun, 18 Oct 2009 03:05:02 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248391</guid>
		<description>Stephan,

Just like you, I have seen a lot of horrible code written in the ORM layers, but do you have any evidence that these problems will disappear with NoSQL and other alternatives?

At any rate, you can&#039;t dismiss a technology just by observing that it can be misused. After all, C++ is still going very strong today...

-- 
Cedric</description>
		<content:encoded><![CDATA[<p>Stephan,</p>
<p>Just like you, I have seen a lot of horrible code written in the ORM layers, but do you have any evidence that these problems will disappear with NoSQL and other alternatives?</p>
<p>At any rate, you can&#8217;t dismiss a technology just by observing that it can be misused. After all, C++ is still going very strong today&#8230;</p>
<p>&#8211;<br />
Cedric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Casper Bang</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248364</link>
		<dc:creator>Casper Bang</dc:creator>
		<pubDate>Sat, 17 Oct 2009 22:17:21 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248364</guid>
		<description>I hate the ORM&#039;s I&#039;ve seen. They all try to do so much magic, in the end you end up dealing with just as many problems as without an ORM except now it&#039;s all masked behind countless frameworks.

I think the real way to go is integrate queries into the language, like LINQ does. Though not constrained to ORM&#039;s, it proves tremendously powerful as you get type-safety, syntax help etc. unlike the nasty misuse of annotations and string concatenation known as JPQL.</description>
		<content:encoded><![CDATA[<p>I hate the ORM&#8217;s I&#8217;ve seen. They all try to do so much magic, in the end you end up dealing with just as many problems as without an ORM except now it&#8217;s all masked behind countless frameworks.</p>
<p>I think the real way to go is integrate queries into the language, like LINQ does. Though not constrained to ORM&#8217;s, it proves tremendously powerful as you get type-safety, syntax help etc. unlike the nasty misuse of annotations and string concatenation known as JPQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Bakker</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248355</link>
		<dc:creator>Paul Bakker</dc:creator>
		<pubDate>Sat, 17 Oct 2009 21:26:05 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248355</guid>
		<description>What you are saying is that ORM is bad, because most programmers lack the knowledge to use them correctly. Sessions, lazy loading and performance issues are not something magical, but easily understandable if you understand the framework you&#039;re using. 
So the solution is to go back to basics and do everything ourselves again? I doubt that&#039;s the right solution. You will soon run into the problems we did run in to that made us create ORM frameworks, and from there it all starts over again ;-)

The same is true for web frameworks (or any framework). Is Grails or Seam bad because there&#039;s too much &quot;magic&quot;? Should you prefer plain Servlets?

That being said, if you want to have a simpler ORM framework, you should take a look at iBatis. That&#039;s a very low-level framework that doesn&#039;t have the complexity of a full blown ORM tool, but still offers a good way to map Java classes to a database.</description>
		<content:encoded><![CDATA[<p>What you are saying is that ORM is bad, because most programmers lack the knowledge to use them correctly. Sessions, lazy loading and performance issues are not something magical, but easily understandable if you understand the framework you&#8217;re using.<br />
So the solution is to go back to basics and do everything ourselves again? I doubt that&#8217;s the right solution. You will soon run into the problems we did run in to that made us create ORM frameworks, and from there it all starts over again ;-)</p>
<p>The same is true for web frameworks (or any framework). Is Grails or Seam bad because there&#8217;s too much &#8220;magic&#8221;? Should you prefer plain Servlets?</p>
<p>That being said, if you want to have a simpler ORM framework, you should take a look at iBatis. That&#8217;s a very low-level framework that doesn&#8217;t have the complexity of a full blown ORM tool, but still offers a good way to map Java classes to a database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael L</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248344</link>
		<dc:creator>Michael L</dc:creator>
		<pubDate>Sat, 17 Oct 2009 20:45:03 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248344</guid>
		<description>I think *JAVA* orms are especially leaky. Python and ruby are much tighter IMO</description>
		<content:encoded><![CDATA[<p>I think *JAVA* orms are especially leaky. Python and ruby are much tighter IMO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Mosmann</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248342</link>
		<dc:creator>Michael Mosmann</dc:creator>
		<pubDate>Sat, 17 Oct 2009 20:30:37 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248342</guid>
		<description>as for this lazy exception stuff: i allways wonder why there is no hook or configuration to change this behavior.. if you know, why you wan&#039;t it, a framework like hibernate should not tell you that this idea is wrong.

btw i use hibernate a lot and i am still happy with it (it does fit my needs). and if persistence is not a part of your core business, you should stay with hibernate or any orm you use today...

so i think &quot;orm is dead for somebody&quot;...</description>
		<content:encoded><![CDATA[<p>as for this lazy exception stuff: i allways wonder why there is no hook or configuration to change this behavior.. if you know, why you wan&#8217;t it, a framework like hibernate should not tell you that this idea is wrong.</p>
<p>btw i use hibernate a lot and i am still happy with it (it does fit my needs). and if persistence is not a part of your core business, you should stay with hibernate or any orm you use today&#8230;</p>
<p>so i think &#8220;orm is dead for somebody&#8221;&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: programmer x</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248338</link>
		<dc:creator>programmer x</dc:creator>
		<pubDate>Sat, 17 Oct 2009 20:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248338</guid>
		<description>i just started a new project and it&#039;s entirely based on orm.</description>
		<content:encoded><![CDATA[<p>i just started a new project and it&#8217;s entirely based on orm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tristan (Hunt) Juricek</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248330</link>
		<dc:creator>Tristan (Hunt) Juricek</dc:creator>
		<pubDate>Sat, 17 Oct 2009 19:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248330</guid>
		<description>At my (soon to be former) workplace, there was a strong tendency for devs to develop a bad mental model with Hibernate of the RDBMS (in this case, Postgres.) The #1 offense was using Hibernate&#039;s lazy evaluation *everywhere*, such that the &#039;Object&#039; model was a massive multi-route graph. It&#039;s from maintaining this system that I grew to hate Hibernate.

I switched the group to doing the majority of effort in Scala. Mostly using a tweaked version of the &quot;pimped Connection&quot; too -&gt; basically, just doing straight SQL programming.

The end result: vastly improved quality and performance. For our situation, it&#039;s all we needed as well, and as the system flushed out, the devs just have a better idea of what&#039;s going on. And I&#039;m talking about &quot;this part in memory, this part in the DB&quot; sort of awareness. They just missed and mixed up everything when using an ORM.

In the hands of a master, Hibernate can be impressive. But in a company where the devs are constantly hacking in features, I found it a nightmare.</description>
		<content:encoded><![CDATA[<p>At my (soon to be former) workplace, there was a strong tendency for devs to develop a bad mental model with Hibernate of the RDBMS (in this case, Postgres.) The #1 offense was using Hibernate&#8217;s lazy evaluation *everywhere*, such that the &#8216;Object&#8217; model was a massive multi-route graph. It&#8217;s from maintaining this system that I grew to hate Hibernate.</p>
<p>I switched the group to doing the majority of effort in Scala. Mostly using a tweaked version of the &#8220;pimped Connection&#8221; too -&gt; basically, just doing straight SQL programming.</p>
<p>The end result: vastly improved quality and performance. For our situation, it&#8217;s all we needed as well, and as the system flushed out, the devs just have a better idea of what&#8217;s going on. And I&#8217;m talking about &#8220;this part in memory, this part in the DB&#8221; sort of awareness. They just missed and mixed up everything when using an ORM.</p>
<p>In the hands of a master, Hibernate can be impressive. But in a company where the devs are constantly hacking in features, I found it a nightmare.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248326</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sat, 17 Oct 2009 19:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248326</guid>
		<description>ORMs also have the same problems as RMI. Method calls are not simple method calls. Calling getOrders() on a Customer might result in an exception as does e.g. a simple add(3,4) with RMI.</description>
		<content:encoded><![CDATA[<p>ORMs also have the same problems as RMI. Method calls are not simple method calls. Calling getOrders() on a Customer might result in an exception as does e.g. a simple add(3,4) with RMI.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248324</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sat, 17 Oct 2009 19:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248324</guid>
		<description>@Shantanu: 

&quot;Time-to-market is at least one reason why we still need ORM. I would recommend ORM for prototyping.&quot;

I do agree on that one, yes. If you need a short time to market or do a VC presentation, use an ORM. Or better use Rails ;-) and drop it afterwards.</description>
		<content:encoded><![CDATA[<p>@Shantanu: </p>
<p>&#8220;Time-to-market is at least one reason why we still need ORM. I would recommend ORM for prototyping.&#8221;</p>
<p>I do agree on that one, yes. If you need a short time to market or do a VC presentation, use an ORM. Or better use Rails ;-) and drop it afterwards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248323</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sat, 17 Oct 2009 19:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248323</guid>
		<description>@Cedric: &quot;Hibernate and JPA will still be around and dominant in 5-10 years, as will Java.&quot;

Ah the Java argument again. We do differ on that one +g+

I do not think Hibernate will be an obvious choice for projects in 10 years, not so sure about 5 years. 

I&#039;ve seen ORMs in multi-million line projects and in smaller ones. 

They do help write less boiler code, but people often do misjudge the amount of SQL code they really need beside CRUD.

And many queries I have seen are aggregates. Where a simple count(*) or sum(*) would be enough, developers fetch all objects via Hiberante into a List and then call size().

And there are many more defiancies: The lack of interface support in Hibernate for example often prevents good code. The tight coupling of objects to normalized database schemas often prevent domain object refactoring. And I could go on.</description>
		<content:encoded><![CDATA[<p>@Cedric: &#8220;Hibernate and JPA will still be around and dominant in 5-10 years, as will Java.&#8221;</p>
<p>Ah the Java argument again. We do differ on that one +g+</p>
<p>I do not think Hibernate will be an obvious choice for projects in 10 years, not so sure about 5 years. </p>
<p>I&#8217;ve seen ORMs in multi-million line projects and in smaller ones. </p>
<p>They do help write less boiler code, but people often do misjudge the amount of SQL code they really need beside CRUD.</p>
<p>And many queries I have seen are aggregates. Where a simple count(*) or sum(*) would be enough, developers fetch all objects via Hiberante into a List and then call size().</p>
<p>And there are many more defiancies: The lack of interface support in Hibernate for example often prevents good code. The tight coupling of objects to normalized database schemas often prevent domain object refactoring. And I could go on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248317</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Sat, 17 Oct 2009 18:54:20 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248317</guid>
		<description>Amen. Embrace the &#039;base!</description>
		<content:encoded><![CDATA[<p>Amen. Embrace the &#8216;base!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Petros Amiridis</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248314</link>
		<dc:creator>Petros Amiridis</dc:creator>
		<pubDate>Sat, 17 Oct 2009 17:56:07 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248314</guid>
		<description>Yes it&#039;s true that almost every abstraction leaks one way or another.

Nevertheless, I think ORMs are established and used in many new projects. Even companies that can&#039;t rely on 3rd party ORMs, build their own.

On the other hand, sometimes a good ORM can even predict and optimize the generated SQL queries. Granted, the manually crafted SQL queries can&#039;t be easily beaten, but for most scenarios you don&#039;t need them and if you do, you just break the abstraction yourself (and that&#039;s possible if your ORM choice was wise).</description>
		<content:encoded><![CDATA[<p>Yes it&#8217;s true that almost every abstraction leaks one way or another.</p>
<p>Nevertheless, I think ORMs are established and used in many new projects. Even companies that can&#8217;t rely on 3rd party ORMs, build their own.</p>
<p>On the other hand, sometimes a good ORM can even predict and optimize the generated SQL queries. Granted, the manually crafted SQL queries can&#8217;t be easily beaten, but for most scenarios you don&#8217;t need them and if you do, you just break the abstraction yourself (and that&#8217;s possible if your ORM choice was wise).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shantanu Kumar</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248313</link>
		<dc:creator>Shantanu Kumar</dc:creator>
		<pubDate>Sat, 17 Oct 2009 17:41:30 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248313</guid>
		<description>Stephan, I agree in principle with what you say. Having said that I think ORM is here to stay (like Java) until we will have devised a better, faster way to talk to relational databases.

Spring JDBC absolutely rocks, but can you deal with the time-to-market demand on a medium / large project with that? Time-to-market is at least one reason why we still need ORM. I would recommend ORM for prototyping.

Key-value data stores are going to mature and get better or probably we will begin to see hybrids. Till then, I guess we just need to grin and bear ORM.</description>
		<content:encoded><![CDATA[<p>Stephan, I agree in principle with what you say. Having said that I think ORM is here to stay (like Java) until we will have devised a better, faster way to talk to relational databases.</p>
<p>Spring JDBC absolutely rocks, but can you deal with the time-to-market demand on a medium / large project with that? Time-to-market is at least one reason why we still need ORM. I would recommend ORM for prototyping.</p>
<p>Key-value data stores are going to mature and get better or probably we will begin to see hybrids. Till then, I guess we just need to grin and bear ORM.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cedric</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248311</link>
		<dc:creator>Cedric</dc:creator>
		<pubDate>Sat, 17 Oct 2009 17:07:16 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248311</guid>
		<description>Hi Stephan,

Well, you&#039;re not offering much of an alternative, are you?  :-)

Sure, ORM&#039;s have well documented deficiencies, but they&#039;re really the best solution we have right now, and to be honest, they perform much better than what you claiming.

As for these other solutions that you mention (NoSQL, Polyglot Persistence), they are far, far, far from having proven themselves in even the simplest scenarios, and their shortcomings have already been widely documented.

Hibernate and JPA will still be around and dominant in 5-10 years, as will Java.

-- 
Cedric</description>
		<content:encoded><![CDATA[<p>Hi Stephan,</p>
<p>Well, you&#8217;re not offering much of an alternative, are you?  :-)</p>
<p>Sure, ORM&#8217;s have well documented deficiencies, but they&#8217;re really the best solution we have right now, and to be honest, they perform much better than what you claiming.</p>
<p>As for these other solutions that you mention (NoSQL, Polyglot Persistence), they are far, far, far from having proven themselves in even the simplest scenarios, and their shortcomings have already been widely documented.</p>
<p>Hibernate and JPA will still be around and dominant in 5-10 years, as will Java.</p>
<p>&#8211;<br />
Cedric</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248305</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sat, 17 Oct 2009 15:17:20 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248305</guid>
		<description>I just get sick and tired of maintaining the database schema, the queries, the data structures to hold the results and the code to query the database...So many cards stacked delicately.  At least with something like ActiveRecord you only ever say things once, and can drop down to SQL if you want.

I&#039;m sorry, but if I have a PERSON table with a FIRST_NAME and a LAST_NAME, why, in this day and age, do I need to put together a class named Person with fields named firstName and lastName and glue it all together myself?  Not everyone is building amazon.com and Facebook.  In fact, few are.  And for the vast majority of us, ORMs like HB or AR are more than sufficient.  Rolling your own is so &#039;98.</description>
		<content:encoded><![CDATA[<p>I just get sick and tired of maintaining the database schema, the queries, the data structures to hold the results and the code to query the database&#8230;So many cards stacked delicately.  At least with something like ActiveRecord you only ever say things once, and can drop down to SQL if you want.</p>
<p>I&#8217;m sorry, but if I have a PERSON table with a FIRST_NAME and a LAST_NAME, why, in this day and age, do I need to put together a class named Person with fields named firstName and lastName and glue it all together myself?  Not everyone is building amazon.com and Facebook.  In fact, few are.  And for the vast majority of us, ORMs like HB or AR are more than sufficient.  Rolling your own is so &#8216;98.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stephan</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248303</link>
		<dc:creator>stephan</dc:creator>
		<pubDate>Sat, 17 Oct 2009 14:49:35 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248303</guid>
		<description>@Jens: &quot;You are basically building your own specialized ORM. Again.&quot;

Yes and no. No because you will not use the magic of ORMs like session managment, change management etc. Yes because you will need to manage your associations by yourself. But association managment with ORMs has the same problem as RMI: It seems to be transparent, but it is not (lazy exceptions and remote exceptions).</description>
		<content:encoded><![CDATA[<p>@Jens: &#8220;You are basically building your own specialized ORM. Again.&#8221;</p>
<p>Yes and no. No because you will not use the magic of ORMs like session managment, change management etc. Yes because you will need to manage your associations by yourself. But association managment with ORMs has the same problem as RMI: It seems to be transparent, but it is not (lazy exceptions and remote exceptions).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Schauder</title>
		<link>http://codemonkeyism.com/orms/comment-page-1/#comment-248301</link>
		<dc:creator>Jens Schauder</dc:creator>
		<pubDate>Sat, 17 Oct 2009 14:39:06 +0000</pubDate>
		<guid isPermaLink="false">http://codemonkeyism.com/?p=1293#comment-248301</guid>
		<description>I&#039;d say ORMs are just as much a thing of the past as Java.

Of course your points are valid, but really the problem is: what do you gain by not using an ORM? You are solving the problem that you have in some of the cases with an ORM for all SQL Statements. You loose the power of refactoring your database with your domain objects. You have to track the changes you do yourself.

You are basically building your own specialized ORM. Again.

As to Scala and non sql databases. I say: Nice ideas, but by far not enough ressources available for usage in many projects. Hell, often we have to fight for using Java 1.5 because big companies are still stuck at Websphere 6.0</description>
		<content:encoded><![CDATA[<p>I&#8217;d say ORMs are just as much a thing of the past as Java.</p>
<p>Of course your points are valid, but really the problem is: what do you gain by not using an ORM? You are solving the problem that you have in some of the cases with an ORM for all SQL Statements. You loose the power of refactoring your database with your domain objects. You have to track the changes you do yourself.</p>
<p>You are basically building your own specialized ORM. Again.</p>
<p>As to Scala and non sql databases. I say: Nice ideas, but by far not enough ressources available for usage in many projects. Hell, often we have to fight for using Java 1.5 because big companies are still stuck at Websphere 6.0</p>
]]></content:encoded>
	</item>
</channel>
</rss>
