<?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: ORM Is NOT Inherently Evil</title>
	<atom:link href="http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/feed/" rel="self" type="application/rss+xml" />
	<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/</link>
	<description>Trying to walk that thin line between intelligence and ignorance</description>
	<lastBuildDate>Thu, 29 Jul 2010 21:01:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-23283</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Mon, 21 Dec 2009 15:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-23283</guid>
		<description>@Brian

Any technology choice should be properly investigated (at least a representative spike should be done) before actually using it in a real project.  If you had done the research in advance, you probably wouldn&#039;t have gone with Linq To Sql since it&#039;s very clear that it is limited to SQL Server only.  Entity Framework is supposed to be database independent, but it&#039;s always been very clear that providers for other databases aren&#039;t necessarily available and nobody ever said they would be free.

As for NHibernate, there are indeed many choices, most of which should be made based on the outcome of your spike or your research.

I don&#039;t think the current problem you&#039;re facing can be blamed on any ORM... i think it&#039;s because your team did not do the proper research in advance.  If your team was not given the proper time to do this research, then it&#039;s a management problem that no piece of technology will ever be able to fix.</description>
		<content:encoded><![CDATA[<p>@Brian</p>
<p>Any technology choice should be properly investigated (at least a representative spike should be done) before actually using it in a real project.  If you had done the research in advance, you probably wouldn&#8217;t have gone with Linq To Sql since it&#8217;s very clear that it is limited to SQL Server only.  Entity Framework is supposed to be database independent, but it&#8217;s always been very clear that providers for other databases aren&#8217;t necessarily available and nobody ever said they would be free.</p>
<p>As for NHibernate, there are indeed many choices, most of which should be made based on the outcome of your spike or your research.</p>
<p>I don&#8217;t think the current problem you&#8217;re facing can be blamed on any ORM&#8230; i think it&#8217;s because your team did not do the proper research in advance.  If your team was not given the proper time to do this research, then it&#8217;s a management problem that no piece of technology will ever be able to fix.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-23282</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Mon, 21 Dec 2009 15:13:48 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-23282</guid>
		<description>I am a big fan of ORM ideology but am losing faith in them in practice. I wouldn&#039;t contend either way that ORM tools&#039; performance in an application match the performance of ADO.Net or stored procedures, but I think ORM&#039;s have a long way to go with start-up costs as in the value of time and sometimes money.

ORM idealists have been stating for a long time that ORM&#039;s are portable and easy to use. I have read place after place that NHibernate is just as good if not better than LINQ and I have heard the same arguments for the opposite. I have followed down the ORM path only to be disappointed by these promises. You might use the argument like you did in your article that my knowledge in the tool isn&#039;t good enough or that I&#039;m not using it right. However, as I&#039;ll described below, I don&#039;t think there&#039;s enough time to gain the expertise needed with some of these ORM&#039;s when there are actual deadlines.

The current project that I am currently working on has taken far too many months to implement because I&#039;m trying to use ORMs. Prior to this project I learned LINQ which was very easy to learn and quite enjoyable; however, now I need to connect to an ISeries DB2 server. LINQ does not have support for DB2 which breaks one of the promises with portability. Microsoft developed the Entity Modeling framework to achieve this but after much research, I find that it will only work when the database vendor creates connectivity for Microsoft&#039;s Entity Modeling framework. After further research I find that IBM has developed such connectivity but it costs $11,000. There&#039;s very little information about IBM&#039;s framework, no demos that I can find, so I don&#039;t know if it would be worth the money.

I then find NHibernate and become hopeful. It is touted as a competitor to LINQ, it fully impliments ORM, yadda, yadda. However, as you admitted in one of your posts, the documentation is simplistic and lackluster which for me has been one of the most frustrating things about the product. When beginning with NHibernate a person has a lot of decisions to make. Do you want source code or not. If you do you have to then download SVN and Nant. If you don&#039;t proceed. Then, you have to decide whether you want to map using XML, NHibernate.Mapping.Attributes, or fluent. This involves more research and hopefully you&#039;ve made the right decision. 

Now, you have to decide on a proxy. There appears to be five available. Again, more research and again, hopefully the right one is chosen. So I went down the path of no source code (I now regret that but have since downloaded), Using NHibernate.Mapping.Attributes (I now regret), and using Castle (No regrets, lucky decision). I also attempted to utilize Rhino commons by downloading the source but that in itself left much frustration as I couldn&#039;t get it to compile with Nant and when I submitted questions to the user groups I received no answers. Finding lack of support about NHibernate tools and NHibernate itself is common.

In my scenario, I&#039;m working with tables that have composite keys (not my choice). I could get the composite key mappings to work but not the associations. Finding clear and useful examples of one-to-many relationships using composite keys is next to impossible. I have now decided to give up on NHibernate because I foresee myself facing even more problems and am going back to a more simplistic and possible approach: ADO.Net.

In the end, business managers don&#039;t care about ORMs or a person&#039;s troubles with them, they just want the finished product.</description>
		<content:encoded><![CDATA[<p>I am a big fan of ORM ideology but am losing faith in them in practice. I wouldn&#8217;t contend either way that ORM tools&#8217; performance in an application match the performance of ADO.Net or stored procedures, but I think ORM&#8217;s have a long way to go with start-up costs as in the value of time and sometimes money.</p>
<p>ORM idealists have been stating for a long time that ORM&#8217;s are portable and easy to use. I have read place after place that NHibernate is just as good if not better than LINQ and I have heard the same arguments for the opposite. I have followed down the ORM path only to be disappointed by these promises. You might use the argument like you did in your article that my knowledge in the tool isn&#8217;t good enough or that I&#8217;m not using it right. However, as I&#8217;ll described below, I don&#8217;t think there&#8217;s enough time to gain the expertise needed with some of these ORM&#8217;s when there are actual deadlines.</p>
<p>The current project that I am currently working on has taken far too many months to implement because I&#8217;m trying to use ORMs. Prior to this project I learned LINQ which was very easy to learn and quite enjoyable; however, now I need to connect to an ISeries DB2 server. LINQ does not have support for DB2 which breaks one of the promises with portability. Microsoft developed the Entity Modeling framework to achieve this but after much research, I find that it will only work when the database vendor creates connectivity for Microsoft&#8217;s Entity Modeling framework. After further research I find that IBM has developed such connectivity but it costs $11,000. There&#8217;s very little information about IBM&#8217;s framework, no demos that I can find, so I don&#8217;t know if it would be worth the money.</p>
<p>I then find NHibernate and become hopeful. It is touted as a competitor to LINQ, it fully impliments ORM, yadda, yadda. However, as you admitted in one of your posts, the documentation is simplistic and lackluster which for me has been one of the most frustrating things about the product. When beginning with NHibernate a person has a lot of decisions to make. Do you want source code or not. If you do you have to then download SVN and Nant. If you don&#8217;t proceed. Then, you have to decide whether you want to map using XML, NHibernate.Mapping.Attributes, or fluent. This involves more research and hopefully you&#8217;ve made the right decision. </p>
<p>Now, you have to decide on a proxy. There appears to be five available. Again, more research and again, hopefully the right one is chosen. So I went down the path of no source code (I now regret that but have since downloaded), Using NHibernate.Mapping.Attributes (I now regret), and using Castle (No regrets, lucky decision). I also attempted to utilize Rhino commons by downloading the source but that in itself left much frustration as I couldn&#8217;t get it to compile with Nant and when I submitted questions to the user groups I received no answers. Finding lack of support about NHibernate tools and NHibernate itself is common.</p>
<p>In my scenario, I&#8217;m working with tables that have composite keys (not my choice). I could get the composite key mappings to work but not the associations. Finding clear and useful examples of one-to-many relationships using composite keys is next to impossible. I have now decided to give up on NHibernate because I foresee myself facing even more problems and am going back to a more simplistic and possible approach: ADO.Net.</p>
<p>In the end, business managers don&#8217;t care about ORMs or a person&#8217;s troubles with them, they just want the finished product.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-5651</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Tue, 25 Nov 2008 20:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-5651</guid>
		<description>The problem with changing technologies is that people want them to be the very best for every imaginable situation. The holy grail is something people chase for their entire lives but it simply doesn&#039;t exist. Yes, (N)Hibernate is a performant ORM and no it will not work on a ARM4 with 1Mb of RAM nor will it suit your needs in a real time environment. Move on.
Another question might be why we still work with an RDBMS at all and why the hell didn&#039;t OOdatabases kick off? Martin fowler has an interesting view on it in his latest post &lt;a href=&quot;http://martinfowler.com/bliki/DatabaseThaw.html&quot; rel=&quot;nofollow&quot;&gt;. 
Use what best suits your needs.</description>
		<content:encoded><![CDATA[<p>The problem with changing technologies is that people want them to be the very best for every imaginable situation. The holy grail is something people chase for their entire lives but it simply doesn&#8217;t exist. Yes, (N)Hibernate is a performant ORM and no it will not work on a ARM4 with 1Mb of RAM nor will it suit your needs in a real time environment. Move on.<br />
Another question might be why we still work with an RDBMS at all and why the hell didn&#8217;t OOdatabases kick off? Martin fowler has an interesting view on it in his latest post <a href="http://martinfowler.com/bliki/DatabaseThaw.html" rel="nofollow">.<br />
Use what best suits your needs.</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SG</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-5634</link>
		<dc:creator>SG</dc:creator>
		<pubDate>Tue, 25 Nov 2008 15:18:04 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-5634</guid>
		<description>@Gustavo

You&#039;re correct in stating that there are several techniques for addressing the issues I detailed in my post. We utilized the techniques that you suggested as well as several additional techniques. Again, my issue is not a lack of means to address performance issues but that the means often require deeper knowledge of the ORM than is commonly acknowledged.

BTW, HQL was never really an issue with our team, since most people with SQL skills seem to become fluent in HQL within a few days.

@Davy, @Craig

The problem we had with using something other than the ORM to do reporting was that the objects in our model contained logic &amp; behavior that we wanted to leverage on our reports. Not using the ORM meant that we&#039;d be either duplicating behavior or duplicating data access code, neither of which was an ideal solution.

@All

I&#039;d like to echo what Den Ben wrote. The information that is available on the Internet is out there because smart, passionate developers like you care enough to write &amp; comment about the subjects.

To return to my original point, I&#039;ve used and will continue to use ORM solutions, but not every issue that developers have with them is caused by lazy and/or ignorant developers. There are definitely use cases in which developers will need to dig deep into the architecture of the tool in order to extract good performance.</description>
		<content:encoded><![CDATA[<p>@Gustavo</p>
<p>You&#8217;re correct in stating that there are several techniques for addressing the issues I detailed in my post. We utilized the techniques that you suggested as well as several additional techniques. Again, my issue is not a lack of means to address performance issues but that the means often require deeper knowledge of the ORM than is commonly acknowledged.</p>
<p>BTW, HQL was never really an issue with our team, since most people with SQL skills seem to become fluent in HQL within a few days.</p>
<p>@Davy, @Craig</p>
<p>The problem we had with using something other than the ORM to do reporting was that the objects in our model contained logic &amp; behavior that we wanted to leverage on our reports. Not using the ORM meant that we&#8217;d be either duplicating behavior or duplicating data access code, neither of which was an ideal solution.</p>
<p>@All</p>
<p>I&#8217;d like to echo what Den Ben wrote. The information that is available on the Internet is out there because smart, passionate developers like you care enough to write &amp; comment about the subjects.</p>
<p>To return to my original point, I&#8217;ve used and will continue to use ORM solutions, but not every issue that developers have with them is caused by lazy and/or ignorant developers. There are definitely use cases in which developers will need to dig deep into the architecture of the tool in order to extract good performance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davy Brion</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-5629</link>
		<dc:creator>Davy Brion</dc:creator>
		<pubDate>Tue, 25 Nov 2008 13:07:49 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-5629</guid>
		<description>&quot;However, what remains to be said is simply that not every tool fits every situation.&quot;

yes definitely... ORM is great for a lot of applications, but definitely not all of them

and parts like reporting should never work with an ORM IMO</description>
		<content:encoded><![CDATA[<p>&#8220;However, what remains to be said is simply that not every tool fits every situation.&#8221;</p>
<p>yes definitely&#8230; ORM is great for a lot of applications, but definitely not all of them</p>
<p>and parts like reporting should never work with an ORM IMO</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-5628</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Tue, 25 Nov 2008 12:59:46 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-5628</guid>
		<description>@SG

I agree with your assessment.  I also agree with Davy.  However, what remains to be said is simply that not every tool fits every situation.  You mention reporting.  I quite frankly do not even attempt any level of complex reporting using an ORM.  There are many reporting tools out there for that.  ORM wasn&#039;t meant to solve the reporting problem, so lets not even try to push it into that bucket.</description>
		<content:encoded><![CDATA[<p>@SG</p>
<p>I agree with your assessment.  I also agree with Davy.  However, what remains to be said is simply that not every tool fits every situation.  You mention reporting.  I quite frankly do not even attempt any level of complex reporting using an ORM.  There are many reporting tools out there for that.  ORM wasn&#8217;t meant to solve the reporting problem, so lets not even try to push it into that bucket.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gustavo</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-5626</link>
		<dc:creator>Gustavo</dc:creator>
		<pubDate>Tue, 25 Nov 2008 12:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-5626</guid>
		<description>@SG

If you need to optimize the efficiency of an specific query using a well optimized SQL string or SP instead of an HQL or criteria you have a seamless way to do it even without changing the code only the mapping between  and  so an optimized sql query and ORM keep being compatible, and there isn&#039;t a point there.

I sometimes even don&#039;t know how to write something in HQL, i write it in SQL and when i learn how to do it the HQL way if i benefit from this i replace the mapping if not i live it as is.

Gustavo.</description>
		<content:encoded><![CDATA[<p>@SG</p>
<p>If you need to optimize the efficiency of an specific query using a well optimized SQL string or SP instead of an HQL or criteria you have a seamless way to do it even without changing the code only the mapping between  and  so an optimized sql query and ORM keep being compatible, and there isn&#8217;t a point there.</p>
<p>I sometimes even don&#8217;t know how to write something in HQL, i write it in SQL and when i learn how to do it the HQL way if i benefit from this i replace the mapping if not i live it as is.</p>
<p>Gustavo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #230</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-5617</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #230</dc:creator>
		<pubDate>Tue, 25 Nov 2008 08:39:44 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-5617</guid>
		<description>[...] ORM Is NOT Inherently Evil - Davy Brion addresses one of the common developer opinions that Object Relational Mappers are evil [...]</description>
		<content:encoded><![CDATA[<p>[...] ORM Is NOT Inherently Evil &#8211; Davy Brion addresses one of the common developer opinions that Object Relational Mappers are evil [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: den Ben</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-5608</link>
		<dc:creator>den Ben</dc:creator>
		<pubDate>Tue, 25 Nov 2008 06:43:55 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-5608</guid>
		<description>@SG

Well put! ;-)

Luckily it&#039;s the effort that some people invest in ORM technologies (like Davy does with NHibernate) and that they want to share with the developer community (again.. Davy does a nice job at that) which allows us to get acquainted a bit deeper than on just the &quot;friends&quot; level.  I plan on making 2nd base in the near future ;-)</description>
		<content:encoded><![CDATA[<p>@SG</p>
<p>Well put! <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Luckily it&#8217;s the effort that some people invest in ORM technologies (like Davy does with NHibernate) and that they want to share with the developer community (again.. Davy does a nice job at that) which allows us to get acquainted a bit deeper than on just the &#8220;friends&#8221; level.  I plan on making 2nd base in the near future <img src='http://davybrion.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SG</title>
		<link>http://davybrion.com/blog/2008/11/orm-is-not-inherently-evil/comment-page-1/#comment-5602</link>
		<dc:creator>SG</dc:creator>
		<pubDate>Tue, 25 Nov 2008 04:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://davybrion.com/blog/?p=628#comment-5602</guid>
		<description>While it&#039;s wrong to assume that ORMs can never work &quot;right&quot;, it&#039;s equally simplistic to assume that anyone who has had trouble with ORM performance wasn&#039;t using them &quot;properly&quot;. 

I feel like I have a decent grasp of both databases/SQL and ORMs (or Hibernate, at least), having written tens of thousands of lines of stored procedure code as well as having used Hibernate to develop a 100+ KLOC production system. The ORM design/usage was reviewed and validated by Hibernate consultants working for Red Hat /JBoss.

IMHO, there exist situations which are fairly trivial to handle from a SQL perspective that, in order to get acceptable performance, require using ORM techniques that are often sparsely documented. Reporting often falls into this category, as do operations in which large numbers of objects/records must be matched and/or reconciled. The performance issues typically do not become apparent until a system has hundreds of thousands or millions of rows in key transactional tables.

Of course, systems using straight SQL are not immune to this effect, but there are literally hundreds of books and thousands of articles about tuning SQL queries, while the techniques for obtaining the best results with an ORM are harder to find and, for me at least, involved significant research and trial &amp; error.

In summary, an ORM can definitely be your friend when it comes to reducing the amount of time you need to spend writing data access code, but once you&#039;ve accumulated enough data, you might have to become more than just &quot;friends&quot; with your ORM and become intimate with her inner workings.</description>
		<content:encoded><![CDATA[<p>While it&#8217;s wrong to assume that ORMs can never work &#8220;right&#8221;, it&#8217;s equally simplistic to assume that anyone who has had trouble with ORM performance wasn&#8217;t using them &#8220;properly&#8221;. </p>
<p>I feel like I have a decent grasp of both databases/SQL and ORMs (or Hibernate, at least), having written tens of thousands of lines of stored procedure code as well as having used Hibernate to develop a 100+ KLOC production system. The ORM design/usage was reviewed and validated by Hibernate consultants working for Red Hat /JBoss.</p>
<p>IMHO, there exist situations which are fairly trivial to handle from a SQL perspective that, in order to get acceptable performance, require using ORM techniques that are often sparsely documented. Reporting often falls into this category, as do operations in which large numbers of objects/records must be matched and/or reconciled. The performance issues typically do not become apparent until a system has hundreds of thousands or millions of rows in key transactional tables.</p>
<p>Of course, systems using straight SQL are not immune to this effect, but there are literally hundreds of books and thousands of articles about tuning SQL queries, while the techniques for obtaining the best results with an ORM are harder to find and, for me at least, involved significant research and trial &amp; error.</p>
<p>In summary, an ORM can definitely be your friend when it comes to reducing the amount of time you need to spend writing data access code, but once you&#8217;ve accumulated enough data, you might have to become more than just &#8220;friends&#8221; with your ORM and become intimate with her inner workings.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
