<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: A 3-tier model</title>
	<atom:link href="http://devinstance.wordpress.com/2006/08/19/a-3-tier-model/feed/" rel="self" type="application/rss+xml" />
	<link>http://devinstance.wordpress.com/2006/08/19/a-3-tier-model/</link>
	<description>Life should taste as good as it</description>
	<lastBuildDate>Thu, 30 Nov 2006 20:00:16 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ceconjr</title>
		<link>http://devinstance.wordpress.com/2006/08/19/a-3-tier-model/#comment-5</link>
		<dc:creator>ceconjr</dc:creator>
		<pubDate>Sat, 26 Aug 2006 19:12:38 +0000</pubDate>
		<guid isPermaLink="false">http://devinstance.wordpress.com/2006/08/19/a-3-tier-model/#comment-5</guid>
		<description>Ok, you&#039;ve got a point.

However, I think that if &quot;ease of migration to different persistence types&quot; was a requirement, I would go with the adoption of a good persistence service implementation like NHibernate (http://www.hibernate.org/343.html).

About &quot;data access&quot; being a subject, I do not agree with it (that&#039;s just my opinion). We must remember that what matter is not really the number of subjects at all, but the cohesion of a class. As we can define cohesion as the degree of relatedness of the members in a class, I think that a class with a hundred methods that contains dynamic SQL code is not dealing with one subject called &quot;data access&quot;, but maybe with a hundred subjects, each one related to the class that uses the method. I&#039;ll tell you why: when you write a method in this class (the class that contains all the SQL statements), you will have a code snippet that builds a SQL statement using dynamic SQL. What is the MOST important subject here? The &quot;data access&quot; represented by the construction of the SQL statement or WHAT the SQL statement really do (eg: retrieves a user from database)? I stay with the last one. :)</description>
		<content:encoded><![CDATA[<p>Ok, you&#8217;ve got a point.</p>
<p>However, I think that if &#8220;ease of migration to different persistence types&#8221; was a requirement, I would go with the adoption of a good persistence service implementation like NHibernate (<a href="http://www.hibernate.org/343.html" rel="nofollow">http://www.hibernate.org/343.html</a>).</p>
<p>About &#8220;data access&#8221; being a subject, I do not agree with it (that&#8217;s just my opinion). We must remember that what matter is not really the number of subjects at all, but the cohesion of a class. As we can define cohesion as the degree of relatedness of the members in a class, I think that a class with a hundred methods that contains dynamic SQL code is not dealing with one subject called &#8220;data access&#8221;, but maybe with a hundred subjects, each one related to the class that uses the method. I&#8217;ll tell you why: when you write a method in this class (the class that contains all the SQL statements), you will have a code snippet that builds a SQL statement using dynamic SQL. What is the MOST important subject here? The &#8220;data access&#8221; represented by the construction of the SQL statement or WHAT the SQL statement really do (eg: retrieves a user from database)? I stay with the last one. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Igor Ramadas</title>
		<link>http://devinstance.wordpress.com/2006/08/19/a-3-tier-model/#comment-4</link>
		<dc:creator>Igor Ramadas</dc:creator>
		<pubDate>Mon, 21 Aug 2006 14:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://devinstance.wordpress.com/2006/08/19/a-3-tier-model/#comment-4</guid>
		<description>I would go with the first option, putting all the SQL statements together. If you need to support a new database or repository, that isn&#039;t SQL compliant, you&#039;ll have to change all your business classes. Putting them together (all code related to data access on one or more dedicated classes), you could create a base class, that has common statements, and create inherited classes with the special modifications for each database.

And you could assume that &quot;data access&quot; is a subject, too :-)</description>
		<content:encoded><![CDATA[<p>I would go with the first option, putting all the SQL statements together. If you need to support a new database or repository, that isn&#8217;t SQL compliant, you&#8217;ll have to change all your business classes. Putting them together (all code related to data access on one or more dedicated classes), you could create a base class, that has common statements, and create inherited classes with the special modifications for each database.</p>
<p>And you could assume that &#8220;data access&#8221; is a subject, too <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
