<?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: Refactoring Day 14 : Break Responsibilities</title>
	<atom:link href="http://lostechies.com/seanchambers/2009/08/14/refactoring-day-14-break-responsibilities/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/seanchambers/2009/08/14/refactoring-day-14-break-responsibilities/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Thu, 13 Sep 2012 07:11:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: schambers</title>
		<link>http://lostechies.com/seanchambers/2009/08/14/refactoring-day-14-break-responsibilities/#comment-410</link>
		<dc:creator>schambers</dc:creator>
		<pubDate>Wed, 11 Nov 2009 13:02:39 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/14/refactoring-day-14-break-responsibilities.aspx#comment-410</guid>
		<description>@Robert the example is a bit contrived so the two other comment posters are partially correct. You can just pass this to the videos.add(this) method, although I don&#039;t agree that you should move the RentVideo method to the Customer object. That violates single responsibility principle in the fact that now the customer is in charge of maintaining account balance AND renting videos which is a mix of responsiblities.

I&#039;m not sure how this makes it more confusing. It&#039;s simply applying the single responsibility principle. When you start to get more than one reason for a class to change it has too many responsibilities and should be broken up into more distinct classes.

Does that make sense?</description>
		<content:encoded><![CDATA[<p>@Robert the example is a bit contrived so the two other comment posters are partially correct. You can just pass this to the videos.add(this) method, although I don&#8217;t agree that you should move the RentVideo method to the Customer object. That violates single responsibility principle in the fact that now the customer is in charge of maintaining account balance AND renting videos which is a mix of responsiblities.</p>
<p>I&#8217;m not sure how this makes it more confusing. It&#8217;s simply applying the single responsibility principle. When you start to get more than one reason for a class to change it has too many responsibilities and should be broken up into more distinct classes.</p>
<p>Does that make sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://lostechies.com/seanchambers/2009/08/14/refactoring-day-14-break-responsibilities/#comment-409</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Wed, 11 Nov 2009 09:05:18 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/14/refactoring-day-14-break-responsibilities.aspx#comment-409</guid>
		<description>It&#039;s great you post these refactorings, and they mostly make sense. Although I would really appreciate you answering the above asked questions, because this way it makes things more confusing.</description>
		<content:encoded><![CDATA[<p>It&#8217;s great you post these refactorings, and they mostly make sense. Although I would really appreciate you answering the above asked questions, because this way it makes things more confusing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://lostechies.com/seanchambers/2009/08/14/refactoring-day-14-break-responsibilities/#comment-408</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Sun, 16 Aug 2009 23:35:00 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/14/refactoring-day-14-break-responsibilities.aspx#comment-408</guid>
		<description>And why does CalculateBalance accept a customer object?</description>
		<content:encoded><![CDATA[<p>And why does CalculateBalance accept a customer object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://lostechies.com/seanchambers/2009/08/14/refactoring-day-14-break-responsibilities/#comment-407</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Sun, 16 Aug 2009 23:28:59 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/14/refactoring-day-14-break-responsibilities.aspx#comment-407</guid>
		<description>Why is RentVideo in Video and accepting a video object?

Wouldn&#039;t it be better to either move RentVideo to the customer object and only accept a video object OR rename it to RentToCustomer (or something along those lines) and only accept a customer object? With the first option being the preference, as video shouldn&#039;t have to deal with the customer objects internal collection.</description>
		<content:encoded><![CDATA[<p>Why is RentVideo in Video and accepting a video object?</p>
<p>Wouldn&#8217;t it be better to either move RentVideo to the customer object and only accept a video object OR rename it to RentToCustomer (or something along those lines) and only accept a customer object? With the first option being the preference, as video shouldn&#8217;t have to deal with the customer objects internal collection.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Claus J&#248;rgensen</title>
		<link>http://lostechies.com/seanchambers/2009/08/14/refactoring-day-14-break-responsibilities/#comment-406</link>
		<dc:creator>Claus J&#248;rgensen</dc:creator>
		<pubDate>Sun, 16 Aug 2009 10:04:11 +0000</pubDate>
		<guid isPermaLink="false">/blogs/sean_chambers/archive/2009/08/14/refactoring-day-14-break-responsibilities.aspx#comment-406</guid>
		<description>Since the Video.RentVideo method isn&#039;t static, why would you need to pass the video argument along, opposite to doing it like this: 

public void RentVideo(Customer customer) { customer.Videos.Add(this); }

</description>
		<content:encoded><![CDATA[<p>Since the Video.RentVideo method isn&#8217;t static, why would you need to pass the video argument along, opposite to doing it like this: </p>
<p>public void RentVideo(Customer customer) { customer.Videos.Add(this); }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
