<?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: The Four Stages of Object-Relational Mapping (a progression)</title>
	<atom:link href="http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/feed/" rel="self" type="application/rss+xml" />
	<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/</link>
	<description>Miscellaneous musings on life, .NET development, and related things that don't really matter</description>
	<pubDate>Thu, 17 May 2012 21:22:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Adnan Ahmad</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-13236</link>
		<dc:creator>Adnan Ahmad</dc:creator>
		<pubDate>Sat, 11 Apr 2009 14:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-13236</guid>
		<description>Here is our blog http://www.orasissoftware.com/blog for more info about the mapping software and podcasts!</description>
		<content:encoded><![CDATA[<p>Here is our blog <a href="http://www.orasissoftware.com/blog" rel="nofollow">http://www.orasissoftware.com/blog</a> for more info about the mapping software and podcasts!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Savvas Christo</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-12950</link>
		<dc:creator>Savvas Christo</dc:creator>
		<pubDate>Tue, 07 Apr 2009 17:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-12950</guid>
		<description>I have been using Orasis Mapping Studio 2009 and I had a great experience and great results. I launch it on my desktop, I do all of my database mappings and I reference the .csproj from my Visual Studio solution. Very easy to use and saves me tons of time. I have tried ORM and not only they do not always perform, some queries take for ever to implement. Why not use and get done in minutes? I have better things to do rather writing database code.</description>
		<content:encoded><![CDATA[<p>I have been using Orasis Mapping Studio 2009 and I had a great experience and great results. I launch it on my desktop, I do all of my database mappings and I reference the .csproj from my Visual Studio solution. Very easy to use and saves me tons of time. I have tried ORM and not only they do not always perform, some queries take for ever to implement. Why not use and get done in minutes? I have better things to do rather writing database code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sbohlen</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-11037</link>
		<dc:creator>sbohlen</dc:creator>
		<pubDate>Thu, 19 Feb 2009 16:06:04 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-11037</guid>
		<description>@Adnan:

In the spirit of open-mindedness and being willing to have my assumptions challenged, I will put it on the list to investigate and let you know my thoughts.

It may indeed be solving a problem I didn't know I had :)

Thanks~!</description>
		<content:encoded><![CDATA[<p>@Adnan:</p>
<p>In the spirit of open-mindedness and being willing to have my assumptions challenged, I will put it on the list to investigate and let you know my thoughts.</p>
<p>It may indeed be solving a problem I didn&#8217;t know I had <img src='http://unhandled-exceptions.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks~!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adnan Ahmad</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-11036</link>
		<dc:creator>Adnan Ahmad</dc:creator>
		<pubDate>Thu, 19 Feb 2009 14:49:24 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-11036</guid>
		<description>@sbohlen and @Ryan

Thanks for your questions.

Orasis is not different from other ORMs in achieving the same results i.e. database abstraction and mapping Objects to Databases. How it achieves that it is completely different. I would just say that while the rest are all frameworks with maybe some GUI to get you going, Orasis is not a framework! It is a database access layer development IDE that you use build and manage queries and mappings to your Objects (using refelection and query metadata). When you say "Build" it then calls its internal code generator to generate you pure ADO.NET code to achieve your mapping results. You can then use the code or the generated Assembly in your project directly. And what developer would not want the ability to actually run and test their DAL layer and mappings before calling them in their Application layer. The Orasis Mapping studio has a built-in tester to execute your code and sql and let you see your results before you even call it from your app.

A download is better than a thousand words. Try it and se for yourself. It is a database access development revolutionary technolgy!</description>
		<content:encoded><![CDATA[<p>@sbohlen and @Ryan</p>
<p>Thanks for your questions.</p>
<p>Orasis is not different from other ORMs in achieving the same results i.e. database abstraction and mapping Objects to Databases. How it achieves that it is completely different. I would just say that while the rest are all frameworks with maybe some GUI to get you going, Orasis is not a framework! It is a database access layer development IDE that you use build and manage queries and mappings to your Objects (using refelection and query metadata). When you say &#8220;Build&#8221; it then calls its internal code generator to generate you pure ADO.NET code to achieve your mapping results. You can then use the code or the generated Assembly in your project directly. And what developer would not want the ability to actually run and test their DAL layer and mappings before calling them in their Application layer. The Orasis Mapping studio has a built-in tester to execute your code and sql and let you see your results before you even call it from your app.</p>
<p>A download is better than a thousand words. Try it and se for yourself. It is a database access development revolutionary technolgy!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sbohlen</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-11031</link>
		<dc:creator>sbohlen</dc:creator>
		<pubDate>Thu, 19 Feb 2009 11:55:20 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-11031</guid>
		<description>@Ryan:

Sorry, that reply (of course) was really intended for Adnan :)</description>
		<content:encoded><![CDATA[<p>@Ryan:</p>
<p>Sorry, that reply (of course) was really intended for Adnan <img src='http://unhandled-exceptions.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sbohlen</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-11030</link>
		<dc:creator>sbohlen</dc:creator>
		<pubDate>Thu, 19 Feb 2009 11:45:46 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-11030</guid>
		<description>@Ryan:

The right tool (for data-access or any job for that matter) is the one that "makes simple stuff easy, makes complex stuff simple, and makes difficult stuff possible".  An ORM that provides you the 'safety valve' of falling back to hand-crafted SQL or even (yes!) sprocs if/when you need them for the small percentage of times that the tool isn't doing for you exactly what you need is absolutely the right choice (and its not a surprise to any reader of this blog that NHibernate does all of that!).

Besides, the world already has an OSS product that "maps SQL queries to objects".  Its called IBATIS (http://ibatis.apache.org/) and in case anyone is interested in pusuing this approach (which to be fair can be quite useful in certain cases), check out either IBATIS (java) or IBATIS.NET (.net) and dig into it-- its a really powerful tool to have in your toolbox, but doesn't rely AT ALL on any code-gen to get its work done.  I've used it in the past for situations where a 'traitional' ORM isn't appropriate/needed/possible and it works quite well for what it is/does.

Its not clear to me at all how Orasis Mapping Studio is an improvement on this already-existing (and quite mature) OSS project.  If anyone knows the answer, please let me know.</description>
		<content:encoded><![CDATA[<p>@Ryan:</p>
<p>The right tool (for data-access or any job for that matter) is the one that &#8220;makes simple stuff easy, makes complex stuff simple, and makes difficult stuff possible&#8221;.  An ORM that provides you the &#8217;safety valve&#8217; of falling back to hand-crafted SQL or even (yes!) sprocs if/when you need them for the small percentage of times that the tool isn&#8217;t doing for you exactly what you need is absolutely the right choice (and its not a surprise to any reader of this blog that NHibernate does all of that!).</p>
<p>Besides, the world already has an OSS product that &#8220;maps SQL queries to objects&#8221;.  Its called IBATIS (http://ibatis.apache.org/) and in case anyone is interested in pusuing this approach (which to be fair can be quite useful in certain cases), check out either IBATIS (java) or IBATIS.NET (.net) and dig into it&#8211; its a really powerful tool to have in your toolbox, but doesn&#8217;t rely AT ALL on any code-gen to get its work done.  I&#8217;ve used it in the past for situations where a &#8216;traitional&#8217; ORM isn&#8217;t appropriate/needed/possible and it works quite well for what it is/does.</p>
<p>Its not clear to me at all how Orasis Mapping Studio is an improvement on this already-existing (and quite mature) OSS project.  If anyone knows the answer, please let me know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-11022</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 19 Feb 2009 03:00:43 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-11022</guid>
		<description>@Adnan

I realize your post was just a product plug...but you know that most ORMs will allow to use your own SQL right?  So just use the ORMs generated SQL until you need to eek out a little more performance and replace that one instance with your hand-crafted SQL.  You could even use SPROCs *gasp* (sorry Steve).</description>
		<content:encoded><![CDATA[<p>@Adnan</p>
<p>I realize your post was just a product plug&#8230;but you know that most ORMs will allow to use your own SQL right?  So just use the ORMs generated SQL until you need to eek out a little more performance and replace that one instance with your hand-crafted SQL.  You could even use SPROCs *gasp* (sorry Steve).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adnan Ahmad</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-11010</link>
		<dc:creator>Adnan Ahmad</dc:creator>
		<pubDate>Wed, 18 Feb 2009 19:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-11010</guid>
		<description>What is the 5th stage then? We have been through all 4 and realized that at the end of the day we needed the SQL that was being generated by the ORM layer to be tweaked to our requirements for performance and data accuracy. We had developed a very rich object Model that captured all our business requirements that had grown from an originally ORM Domain or Entity object. 

So we wrote a layer that would take the SQL and hydrate our Objects directly through ADO.NET. We were kind of back to the basics, but we wrote a tool to do all the work for us and it generate us the code, and managed the mappings instead of writing another Framework or Layer. It was the ideal ORM solution our team was looking for. Things were finally manageable and under control. We got rid of all the configuration and mapping properites code that we had collected in the previous stages and just generated the code from the tool whenever our DAL needed work. The Objects became oblivious of their pesistance, and the generated DAL code acted as a service to read and persist Objects to fulfill specific business requirements and use cases.

You can go check it out at &lt;a href="http://www.orasissoftware.com" rel="nofollow"&gt;Orasis Mapping Studio&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>What is the 5th stage then? We have been through all 4 and realized that at the end of the day we needed the SQL that was being generated by the ORM layer to be tweaked to our requirements for performance and data accuracy. We had developed a very rich object Model that captured all our business requirements that had grown from an originally ORM Domain or Entity object. </p>
<p>So we wrote a layer that would take the SQL and hydrate our Objects directly through ADO.NET. We were kind of back to the basics, but we wrote a tool to do all the work for us and it generate us the code, and managed the mappings instead of writing another Framework or Layer. It was the ideal ORM solution our team was looking for. Things were finally manageable and under control. We got rid of all the configuration and mapping properites code that we had collected in the previous stages and just generated the code from the tool whenever our DAL needed work. The Objects became oblivious of their pesistance, and the generated DAL code acted as a service to read and persist Objects to fulfill specific business requirements and use cases.</p>
<p>You can go check it out at <a href="http://www.orasissoftware.com" rel="nofollow">Orasis Mapping Studio</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unhandled Exceptions &#187; Blog Archive &#187; The Continuing Quest for DEATH of string-literals in my Code&#8230;</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-5552</link>
		<dc:creator>Unhandled Exceptions &#187; Blog Archive &#187; The Continuing Quest for DEATH of string-literals in my Code&#8230;</dc:creator>
		<pubDate>Sun, 23 Nov 2008 11:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-5552</guid>
		<description>[...] the Four Stages of Object/Relational Mapping post, I illustrated in some detail the journey that I personally undertook (and consider to be very [...]</description>
		<content:encoded><![CDATA[<p>[...] the Four Stages of Object/Relational Mapping post, I illustrated in some detail the journey that I personally undertook (and consider to be very [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sbohlen</title>
		<link>http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/comment-page-1/#comment-3174</link>
		<dc:creator>sbohlen</dc:creator>
		<pubDate>Fri, 17 Oct 2008 20:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://unhandled-exceptions.com/blog/index.php/2008/10/04/the-four-stages-of-object-relational-mapping-a-progression/#comment-3174</guid>
		<description>@Wa:

I actually think that your observations are indeed on-target.  As your Domain Model digresses more and more from your relational model, the correspoinding disconnect increases and thus the effort needed to map the two back to each other (usually via an O/RM) can get quite significant.

If your database already exists in your application and you have good reason to radically diverge your Domain Model from the database, then a tool like NHibernate may not be the right one.  IBatis (and IBatis.NET) is a tremndously powerful alternate approach that offers a much more flexible relational &lt;--&gt; object mapping experience than even Hibernate/NHibernate provides.  If your Domain Model really bears *ZERO* resemblance to your relational model, then this might make more sense for your situation.

Its a spectrum though along which you need to decide on a target ROI and a solid cost-benefit target.  Like all good software design questions, the answer is 'it depends' and its up to you to decide what's right for your project, of course.  But in general, yes, you can design yourself into a real corner if you're not careful with developing a Domain Model in complete isolation from any idea about how it will be persisted.

Remember what I always tell people: just because your *objects* are persistent-ignorant doesn't mean that *you* our your *design* should be too :)</description>
		<content:encoded><![CDATA[<p>@Wa:</p>
<p>I actually think that your observations are indeed on-target.  As your Domain Model digresses more and more from your relational model, the correspoinding disconnect increases and thus the effort needed to map the two back to each other (usually via an O/RM) can get quite significant.</p>
<p>If your database already exists in your application and you have good reason to radically diverge your Domain Model from the database, then a tool like NHibernate may not be the right one.  IBatis (and IBatis.NET) is a tremndously powerful alternate approach that offers a much more flexible relational < --> object mapping experience than even Hibernate/NHibernate provides.  If your Domain Model really bears *ZERO* resemblance to your relational model, then this might make more sense for your situation.</p>
<p>Its a spectrum though along which you need to decide on a target ROI and a solid cost-benefit target.  Like all good software design questions, the answer is &#8216;it depends&#8217; and its up to you to decide what&#8217;s right for your project, of course.  But in general, yes, you can design yourself into a real corner if you&#8217;re not careful with developing a Domain Model in complete isolation from any idea about how it will be persisted.</p>
<p>Remember what I always tell people: just because your *objects* are persistent-ignorant doesn&#8217;t mean that *you* our your *design* should be too <img src='http://unhandled-exceptions.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

