<?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: Does object persistence complicate architectures with existing data models?</title>
	<atom:link href="http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/</link>
	<description>eat, program, and be merry</description>
	<lastBuildDate>Tue, 23 Feb 2010 05:56:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brian LeGros</title>
		<link>http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/comment-page-1/#comment-193</link>
		<dc:creator>Brian LeGros</dc:creator>
		<pubDate>Thu, 11 Oct 2007 13:36:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/#comment-193</guid>
		<description>@Brian - Whoever said that is an idiot ... :&#039;(</description>
		<content:encoded><![CDATA[<p>@Brian &#8211; Whoever said that is an idiot &#8230; :&#8217;(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BrianShoeman</title>
		<link>http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/comment-page-1/#comment-192</link>
		<dc:creator>BrianShoeman</dc:creator>
		<pubDate>Thu, 11 Oct 2007 13:23:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/#comment-192</guid>
		<description>As a great (and strangely self-loathing) developer once told me, &quot;It&#039;s just another tool in your toolbox.&quot;</description>
		<content:encoded><![CDATA[<p>As a great (and strangely self-loathing) developer once told me, &#8220;It&#8217;s just another tool in your toolbox.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian LeGros</title>
		<link>http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/comment-page-1/#comment-188</link>
		<dc:creator>Brian LeGros</dc:creator>
		<pubDate>Thu, 11 Oct 2007 00:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/#comment-188</guid>
		<description>@Max - Great example with Hibernate.  I haven&#039;t worked with Hibernate yet (except in the context of Grails), but I really like iBatis, especially for the things we do at CFI.  Thanks for the great comment.</description>
		<content:encoded><![CDATA[<p>@Max &#8211; Great example with Hibernate.  I haven&#8217;t worked with Hibernate yet (except in the context of Grails), but I really like iBatis, especially for the things we do at CFI.  Thanks for the great comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maxim Porges</title>
		<link>http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/comment-page-1/#comment-184</link>
		<dc:creator>Maxim Porges</dc:creator>
		<pubDate>Wed, 10 Oct 2007 04:27:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.brianlegros.com/blog/2007/10/07/does-object-persistence-complicate-archictetures-with-existing-data-models/#comment-184</guid>
		<description>Great post.

With regard to ORM, I&#039;ve seen several things happen in our environment: (1) people try to use it when it&#039;s not appropriate to do so, and then get upset with it as if it&#039;s the tool&#039;s fault, and/or (2) people spend much longer fighting with ORM in bad use cases than they should when they could just reach for a more appropriate solution.

The one project I personally used Hibernate for involved a fresh data model and mapped beautifully to the solution. All the benefits of ORM were realized, with the persistence tier being managed 100% by the framework. There were no problems encountered that took more than a quick perusal of the manual or forums to resolve, and performance tuning the HQL was easy and behaved as expected.

In retrospect, Hibernate gave us the power to really break up the table structure in to a way that I don&#039;t think we would have if we had coded the persistence by hand. We used &lt;a href=&quot;http://martinfowler.com/eaaCatalog/classTableInheritance.html&quot; rel=&quot;nofollow&quot;&gt;Class Table Inheritance&lt;/a&gt;, which is downright difficult to understand just by looking at the tables unless you have a deep understanding of the mapping relationships. If I had to do it again I would go with &lt;a href=&quot;http://martinfowler.com/eaaCatalog/singleTableInheritance.html&quot; rel=&quot;nofollow&quot;&gt;Single Table Inheritance&lt;/a&gt;, since it feels closer to a natural relational model, is easy to understand just by looking at the table structure, and makes writing queries outside of the ORM framework much simpler. You end up with sparsely populated tables, but I think that&#039;s a fair trade off.

iBatis is a nice bridge between full-on ORM and rolling your own persistence. It still provides value by acting as an object factory, and can provide nice mappings between mismatched relational and object models since you are closer to the metal. It&#039;s much easier to map iBatis around inconsistencies than it is to try to get Hibernate to do that for you.

Your last point is really poignant, which is that you don&#039;t have to use ORM (or feel dirty if you don&#039;t). If the overhead of using a tool is higher than not using it, it&#039;s not a tool IMO; it&#039;s a millstone around your neck. Since it&#039;s so easy to mix and match data persistence strategies in whatever DAO or gateway pattern you are implementing, there&#039;s really no excuse to fight with a framework when you can just wrangle the data by hand like we did back in the old days before ORM existed.</description>
		<content:encoded><![CDATA[<p>Great post.</p>
<p>With regard to ORM, I&#8217;ve seen several things happen in our environment: (1) people try to use it when it&#8217;s not appropriate to do so, and then get upset with it as if it&#8217;s the tool&#8217;s fault, and/or (2) people spend much longer fighting with ORM in bad use cases than they should when they could just reach for a more appropriate solution.</p>
<p>The one project I personally used Hibernate for involved a fresh data model and mapped beautifully to the solution. All the benefits of ORM were realized, with the persistence tier being managed 100% by the framework. There were no problems encountered that took more than a quick perusal of the manual or forums to resolve, and performance tuning the HQL was easy and behaved as expected.</p>
<p>In retrospect, Hibernate gave us the power to really break up the table structure in to a way that I don&#8217;t think we would have if we had coded the persistence by hand. We used <a href="http://martinfowler.com/eaaCatalog/classTableInheritance.html" rel="nofollow">Class Table Inheritance</a>, which is downright difficult to understand just by looking at the tables unless you have a deep understanding of the mapping relationships. If I had to do it again I would go with <a href="http://martinfowler.com/eaaCatalog/singleTableInheritance.html" rel="nofollow">Single Table Inheritance</a>, since it feels closer to a natural relational model, is easy to understand just by looking at the table structure, and makes writing queries outside of the ORM framework much simpler. You end up with sparsely populated tables, but I think that&#8217;s a fair trade off.</p>
<p>iBatis is a nice bridge between full-on ORM and rolling your own persistence. It still provides value by acting as an object factory, and can provide nice mappings between mismatched relational and object models since you are closer to the metal. It&#8217;s much easier to map iBatis around inconsistencies than it is to try to get Hibernate to do that for you.</p>
<p>Your last point is really poignant, which is that you don&#8217;t have to use ORM (or feel dirty if you don&#8217;t). If the overhead of using a tool is higher than not using it, it&#8217;s not a tool IMO; it&#8217;s a millstone around your neck. Since it&#8217;s so easy to mix and match data persistence strategies in whatever DAO or gateway pattern you are implementing, there&#8217;s really no excuse to fight with a framework when you can just wrangle the data by hand like we did back in the old days before ORM existed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.407 seconds -->
