<?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: Getting Connected</title>
	<atom:link href="http://jkarlsson.com/blog/2006/08/23/getting-connected/feed/" rel="self" type="application/rss+xml" />
	<link>http://jkarlsson.com/blog/2006/08/23/getting-connected/</link>
	<description>Agile Introvert</description>
	<lastBuildDate>Sat, 04 Sep 2010 12:18:11 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Joakim Karlsson</title>
		<link>http://jkarlsson.com/blog/2006/08/23/getting-connected/comment-page-1/#comment-16</link>
		<dc:creator>Joakim Karlsson</dc:creator>
		<pubDate>Sat, 26 Aug 2006 16:22:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.jkarlsson.com/blog/2006/08/23/getting-connected/#comment-16</guid>
		<description>You&#039;re right. I did add the factory for testing and, well, out of habit. It did feel like a Good Thing to have the creation located at one place so that exchanging implementation later would be easier.

But now that you mention it, I don&#039;t know that I need that flexibility and therefore my code is perhaps more complex than it needs to. I should perhaps have waited until I needed that flexibility and then refactored the code.

The dynamic nature of Ruby may have been the way to go. I&#039;ll play around with both approaches and see what feels most natural to me.

Thanks for the input.</description>
		<content:encoded><![CDATA[<p>You&#8217;re right. I did add the factory for testing and, well, out of habit. It did feel like a Good Thing to have the creation located at one place so that exchanging implementation later would be easier.</p>
<p>But now that you mention it, I don&#8217;t know that I need that flexibility and therefore my code is perhaps more complex than it needs to. I should perhaps have waited until I needed that flexibility and then refactored the code.</p>
<p>The dynamic nature of Ruby may have been the way to go. I&#8217;ll play around with both approaches and see what feels most natural to me.</p>
<p>Thanks for the input.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Mead</title>
		<link>http://jkarlsson.com/blog/2006/08/23/getting-connected/comment-page-1/#comment-15</link>
		<dc:creator>James Mead</dc:creator>
		<pubDate>Sat, 26 Aug 2006 15:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.jkarlsson.com/blog/2006/08/23/getting-connected/#comment-15</guid>
		<description>No problem. Your article seemed to imply you were creating the factory specifically for testing - that&#039;s why I suggested &lt;a href=&quot;http://mocha.rubyforge.org&quot; rel=&quot;nofollow&quot;&gt;Mocha&lt;/a&gt;.

Of course there are other reasons for creating factory classes, but often they are created just in order to be able to inject mocks. While this is necessary in languages like Java (at least without delving into bytecode), in Ruby its possible to use meta-programming to achieve the same effect without cluttering code with factory classes.</description>
		<content:encoded><![CDATA[<p>No problem. Your article seemed to imply you were creating the factory specifically for testing &#8211; that&#8217;s why I suggested <a href="http://mocha.rubyforge.org" rel="nofollow">Mocha</a>.</p>
<p>Of course there are other reasons for creating factory classes, but often they are created just in order to be able to inject mocks. While this is necessary in languages like Java (at least without delving into bytecode), in Ruby its possible to use meta-programming to achieve the same effect without cluttering code with factory classes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joakim Karlsson</title>
		<link>http://jkarlsson.com/blog/2006/08/23/getting-connected/comment-page-1/#comment-14</link>
		<dc:creator>Joakim Karlsson</dc:creator>
		<pubDate>Sat, 26 Aug 2006 14:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.jkarlsson.com/blog/2006/08/23/getting-connected/#comment-14</guid>
		<description>Thanks for the tip James.

I actually like not having calls directly to the constructor from my production code. I like the way the class gets decoupled from an actual implementation of the interface it needs.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip James.</p>
<p>I actually like not having calls directly to the constructor from my production code. I like the way the class gets decoupled from an actual implementation of the interface it needs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Mead</title>
		<link>http://jkarlsson.com/blog/2006/08/23/getting-connected/comment-page-1/#comment-13</link>
		<dc:creator>James Mead</dc:creator>
		<pubDate>Fri, 25 Aug 2006 20:27:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.jkarlsson.com/blog/2006/08/23/getting-connected/#comment-13</guid>
		<description>Have you seen &lt;a href=&quot;http://mocha.rubyforge.org&quot; rel=&quot;nofollow&quot;&gt;Mocha&lt;/a&gt;? It allows you to mock class methods, so you don&#039;t have to make a factory class just for testing - you can just mock the CallReceiver.new method. Make any sense?</description>
		<content:encoded><![CDATA[<p>Have you seen <a href="http://mocha.rubyforge.org" rel="nofollow">Mocha</a>? It allows you to mock class methods, so you don&#8217;t have to make a factory class just for testing &#8211; you can just mock the CallReceiver.new method. Make any sense?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
