<?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"
	>
<channel>
	<title>Comments on: On the subject of DAOs and Interfaces</title>
	<atom:link href="http://www.fuzzylizard.com/archives/2007/02/02/863/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fuzzylizard.com/archives/2007/02/02/863/</link>
	<description>My thoughts on Agile, Java and Ruby on Rails (mostly)</description>
	<pubDate>Thu, 20 Nov 2008 16:27:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Alexander</title>
		<link>http://www.fuzzylizard.com/archives/2007/02/02/863/#comment-11315</link>
		<dc:creator>Alexander</dc:creator>
		<pubDate>Sat, 03 Mar 2007 06:09:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/02/02/863/#comment-11315</guid>
		<description>Creating multiple interfaces makes a lot of sense from testing point of view. IF you want to creates a multi-tier architecture and at the same time make sure that it has significant test coverage (by using EasyMock or JMock frameworks) then this is the way to go. 

In the long run it will minimize the cost of maintenance and simplify future development. IF this is a very small application, and from what you've described (six or seven DAO classes) then creating a complex multi-tier structure may be an overly expensive approach.</description>
		<content:encoded><![CDATA[<p>Creating multiple interfaces makes a lot of sense from testing point of view. IF you want to creates a multi-tier architecture and at the same time make sure that it has significant test coverage (by using EasyMock or JMock frameworks) then this is the way to go. </p>
<p>In the long run it will minimize the cost of maintenance and simplify future development. IF this is a very small application, and from what you&#8217;ve described (six or seven DAO classes) then creating a complex multi-tier structure may be an overly expensive approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Johnston</title>
		<link>http://www.fuzzylizard.com/archives/2007/02/02/863/#comment-10565</link>
		<dc:creator>Chris Johnston</dc:creator>
		<pubDate>Tue, 06 Feb 2007 05:32:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/02/02/863/#comment-10565</guid>
		<description>Interesting perspective and the more I think about it, the more I tend to agree. Some Ruby classes have in excess of 70 methods. Yet, in the Java world, that is seriously frowned upon for some reason (at least in my experience).

I like the point about being pragmatic. Good advice, thanks.</description>
		<content:encoded><![CDATA[<p>Interesting perspective and the more I think about it, the more I tend to agree. Some Ruby classes have in excess of 70 methods. Yet, in the Java world, that is seriously frowned upon for some reason (at least in my experience).</p>
<p>I like the point about being pragmatic. Good advice, thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Irfan</title>
		<link>http://www.fuzzylizard.com/archives/2007/02/02/863/#comment-10533</link>
		<dc:creator>Irfan</dc:creator>
		<pubDate>Sun, 04 Feb 2007 17:31:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.fuzzylizard.com/archives/2007/02/02/863/#comment-10533</guid>
		<description>I would have one DAO for accessing the persistence layer. It doesn't make sense to tie the persistence with the business logic either. And having too many interfaces does seem counter intuitive. "Just because you can have an interface doesn't mean you should". I think the question here lies with being pragmatic. Hibernate is a great tool. I would definitely consider using Hibernate and using one DAO that makes use of a class that manages the use of the Hibernate session. ie (HibernateUtil class).

I could see multiple DAO's being used if you have a large schema but thats fine too. I would probably go with a large facade that delegates all those requests.
If you have a large number of methods then so be it. Again the notion of being pragmatic comes in again.

I'm finding that people seem to do a lot of things the hard way and like to complicate things. I think being pragmatic is very important here.</description>
		<content:encoded><![CDATA[<p>I would have one DAO for accessing the persistence layer. It doesn&#8217;t make sense to tie the persistence with the business logic either. And having too many interfaces does seem counter intuitive. &#8220;Just because you can have an interface doesn&#8217;t mean you should&#8221;. I think the question here lies with being pragmatic. Hibernate is a great tool. I would definitely consider using Hibernate and using one DAO that makes use of a class that manages the use of the Hibernate session. ie (HibernateUtil class).</p>
<p>I could see multiple DAO&#8217;s being used if you have a large schema but thats fine too. I would probably go with a large facade that delegates all those requests.<br />
If you have a large number of methods then so be it. Again the notion of being pragmatic comes in again.</p>
<p>I&#8217;m finding that people seem to do a lot of things the hard way and like to complicate things. I think being pragmatic is very important here.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
