<?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>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
	<atom:link href="http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-nhibernate-for-legacy-databases</link>
	<description></description>
	<lastBuildDate>Tue, 08 May 2012 09:13:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-64339</link>
		<dc:creator>Dilip Singh</dc:creator>
		<pubDate>Mon, 10 Oct 2011 08:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-64339</guid>
		<description>Nice post 


http://d4dilip.wordpress.com/2011/09/27/user-nhibernate-with-legacy-database/</description>
		<content:encoded><![CDATA[<p>Nice post </p>
<p><a href="http://d4dilip.wordpress.com/2011/09/27/user-nhibernate-with-legacy-database/" rel="nofollow">http://d4dilip.wordpress.com/2011/09/27/user-nhibernate-with-legacy-database/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-47737</link>
		<dc:creator>Jan Van Ryswyck</dc:creator>
		<pubDate>Fri, 17 Jul 2009 05:11:06 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-47737</guid>
		<description>@Alan @Serge In my case, I can&#039;t have views (because DBA won&#039;t allow it) and I can&#039;t have stored procedures (well, because simply not supported by the DB at hand). I agree that its still pollution of code, but its infrastructure code. This kind of code is the only place that should get infected by poor DB management and decision making instead of the entire code base. If I had other options (like a view or SP) then keeping this kind of mess out of the application might be a viable option as well, I agree.</description>
		<content:encoded><![CDATA[<p>@Alan @Serge In my case, I can&#8217;t have views (because DBA won&#8217;t allow it) and I can&#8217;t have stored procedures (well, because simply not supported by the DB at hand). I agree that its still pollution of code, but its infrastructure code. This kind of code is the only place that should get infected by poor DB management and decision making instead of the entire code base. If I had other options (like a view or SP) then keeping this kind of mess out of the application might be a viable option as well, I agree.</p>
]]></content:encoded>
	</item>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-47731</link>
		<dc:creator>Serge Van Meerbeeck</dc:creator>
		<pubDate>Thu, 16 Jul 2009 21:22:28 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-47731</guid>
		<description>Nice touch, the idea of using that PropertyAccessor to protect your domain model from the database scheme. Surely shows one of the many extensibility mechanism that NH offers. 

However, I must say that I like the idea of the views as proposed by Alan as well: overall performance will be better in the end, and the creation of a view on a single database table is a relative simple operation. In my experience, legacy databases also often tend to have cryptic column names etc., and you could take the occasion to name fields on the views such that mapping in e.g. FluentHibernate becomes more convention based ...</description>
		<content:encoded><![CDATA[<p>Nice touch, the idea of using that PropertyAccessor to protect your domain model from the database scheme. Surely shows one of the many extensibility mechanism that NH offers. </p>
<p>However, I must say that I like the idea of the views as proposed by Alan as well: overall performance will be better in the end, and the creation of a view on a single database table is a relative simple operation. In my experience, legacy databases also often tend to have cryptic column names etc., and you could take the occasion to name fields on the views such that mapping in e.g. FluentHibernate becomes more convention based &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-47728</link>
		<dc:creator>Alan Baker</dc:creator>
		<pubDate>Thu, 16 Jul 2009 18:18:05 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-47728</guid>
		<description>I have run into some of these exact problems in multiple shops. Your custom access strategy is interesting, but the database and other systems are still polluting your code. 

The approach I eventually settled was to isolate the database with using the Interface Segregation Principle implemented with Views. Create a SQL View that bridges the gap between what your Domain cares about and the realities of the database. For Inserts/Updates, you can either use Updatable Views or Stored Procedures to handle the default data. Updatable Views are a little cleaner because NHibernate sees it as a table and no extra mapping is required. I realize that you&#039;re shifting the complexity out of the code and NHibernate into having to write some SQL. But it seems a cleaner solution to me. An additional benefit is hopefully someday the legacy application will go away and the views will eventually be replaced by actual schema and you can keep your mappings and just change the table name. 

In the event that these legacy issues present themselves on all your tables I might be more inclinded to follow your approach. Writing a significant amount SQL means you lose the advantages of NHibernate.</description>
		<content:encoded><![CDATA[<p>I have run into some of these exact problems in multiple shops. Your custom access strategy is interesting, but the database and other systems are still polluting your code. </p>
<p>The approach I eventually settled was to isolate the database with using the Interface Segregation Principle implemented with Views. Create a SQL View that bridges the gap between what your Domain cares about and the realities of the database. For Inserts/Updates, you can either use Updatable Views or Stored Procedures to handle the default data. Updatable Views are a little cleaner because NHibernate sees it as a table and no extra mapping is required. I realize that you&#8217;re shifting the complexity out of the code and NHibernate into having to write some SQL. But it seems a cleaner solution to me. An additional benefit is hopefully someday the legacy application will go away and the views will eventually be replaced by actual schema and you can keep your mappings and just change the table name. </p>
<p>In the event that these legacy issues present themselves on all your tables I might be more inclinded to follow your approach. Writing a significant amount SQL means you lose the advantages of NHibernate.</p>
]]></content:encoded>
	</item>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-47698</link>
		<dc:creator>Chris Marisic</dc:creator>
		<pubDate>Wed, 15 Jul 2009 13:18:58 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-47698</guid>
		<description>Entirely agreed Jan, pollution of your domain layer is a catastrophe  waiting to happen.

I once worked at a place where objects actually maintained their own population and persistence methods internally. It was ridiculous to maintain once you needed to work with an object in even a shred of a way different than it was originally created for.</description>
		<content:encoded><![CDATA[<p>Entirely agreed Jan, pollution of your domain layer is a catastrophe  waiting to happen.</p>
<p>I once worked at a place where objects actually maintained their own population and persistence methods internally. It was ridiculous to maintain once you needed to work with an object in even a shred of a way different than it was originally created for.</p>
]]></content:encoded>
	</item>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-47686</link>
		<dc:creator>Jan Van Ryswyck</dc:creator>
		<pubDate>Wed, 15 Jul 2009 05:55:41 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-47686</guid>
		<description>Keeping the domain classes as lean as possible and trying to avoid as many infrastructure concerns as I can is not something I consider an abstract principle. Sure it involves some extra efforts, but the gain here is maintainability. If a couple of extra lines of code prevents poor DB management to cripple the application down to its core, then I guess they are worth it.</description>
		<content:encoded><![CDATA[<p>Keeping the domain classes as lean as possible and trying to avoid as many infrastructure concerns as I can is not something I consider an abstract principle. Sure it involves some extra efforts, but the gain here is maintainability. If a couple of extra lines of code prevents poor DB management to cripple the application down to its core, then I guess they are worth it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-47684</link>
		<dc:creator>jdn</dc:creator>
		<pubDate>Wed, 15 Jul 2009 02:50:02 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-47684</guid>
		<description>Why isn&#039;t the &#039;broken window&#039; option better?  Aren&#039;t you writing a lot more code for no other reason than some abstract principle?</description>
		<content:encoded><![CDATA[<p>Why isn&#8217;t the &#8216;broken window&#8217; option better?  Aren&#8217;t you writing a lot more code for no other reason than some abstract principle?</p>
]]></content:encoded>
	</item>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-47668</link>
		<dc:creator>Dew Drop &#8211; July 14, 2009 &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Tue, 14 Jul 2009 13:13:42 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-47668</guid>
		<description>[...] Using NHibernate for Legacy Databases (Jan Van Ryswyck) [...]</description>
		<content:encoded><![CDATA[<p>[...] Using NHibernate for Legacy Databases (Jan Van Ryswyck) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-47662</link>
		<dc:creator>Daily Links for Tuesday, July 14th, 2009</dc:creator>
		<pubDate>Tue, 14 Jul 2009 11:33:10 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-47662</guid>
		<description>[...] Using NHibernate for Legacy Databases &#124; Elegant Code [...]</description>
		<content:encoded><![CDATA[<p>[...] Using NHibernate for Legacy Databases | Elegant Code [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>BUY Nizoral ONLINE WITHOUT PRESCRIPTION</title>
		<link>http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/comment-page-1/#comment-47656</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #389</dc:creator>
		<pubDate>Tue, 14 Jul 2009 06:39:18 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2009/07/13/using-nhibernate-for-legacy-databases/#comment-47656</guid>
		<description>[...] Using NHibernate for Legacy Databases - Jan Van Ryswyck examines some techniques for dealing with legacy databases when working with NHibernate [...]</description>
		<content:encoded><![CDATA[<p>[...] Using NHibernate for Legacy Databases &#8211; Jan Van Ryswyck examines some techniques for dealing with legacy databases when working with NHibernate [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

