<?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: Bean of the Devil: Arguing the Affirmative</title>
	<atom:link href="http://pathfindersoftware.com/2009/03/bean-of-the-devil-arguing-the-affirmative/feed/" rel="self" type="application/rss+xml" />
	<link>http://pathfindersoftware.com/2009/03/bean-of-the-devil-arguing-the-affirmative/</link>
	<description>The Fastest Way to Launch Successful Software</description>
	<lastBuildDate>Thu, 19 Jan 2012 16:36:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Agile Ajax &#187; Bean of the Devil: Tally-Ho CMS &#187; Pathfinder Development</title>
		<link>http://pathfindersoftware.com/2009/03/bean-of-the-devil-arguing-the-affirmative/#comment-9318</link>
		<dc:creator>Agile Ajax &#187; Bean of the Devil: Tally-Ho CMS &#187; Pathfinder Development</dc:creator>
		<pubDate>Sat, 21 Mar 2009 22:17:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1412#comment-9318</guid>
		<description>[...] time we came this way we looked at the misuse of a getter in the java.io.File. Not that it was wrong to have a getter in File, just that is lead to misuse of that information in [...]</description>
		<content:encoded><![CDATA[<p>[...] time we came this way we looked at the misuse of a getter in the java.io.File. Not that it was wrong to have a getter in File, just that is lead to misuse of that information in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://pathfindersoftware.com/2009/03/bean-of-the-devil-arguing-the-affirmative/#comment-9317</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 05 Mar 2009 01:46:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1412#comment-9317</guid>
		<description>The example given is not a good argument about the use of getters and setters.

Objects should have both state and behavior.
Getters and setters are evil when used to process data related to that class.  For example having a Sale class do this:

salesLineItem.setTotal(salesLineItem.getQty() + salesLineItem.getPrice())

rather than this

salesLineItem.calculateTotal()

is an abuse of getters/setters.

Following the &#039;expert&#039; pattern, an operation that requires knowledge of state should reside in the object that contains the state.</description>
		<content:encoded><![CDATA[<p>The example given is not a good argument about the use of getters and setters.</p>
<p>Objects should have both state and behavior.<br />
Getters and setters are evil when used to process data related to that class.  For example having a Sale class do this:</p>
<p>salesLineItem.setTotal(salesLineItem.getQty() + salesLineItem.getPrice())</p>
<p>rather than this</p>
<p>salesLineItem.calculateTotal()</p>
<p>is an abuse of getters/setters.</p>
<p>Following the &#8216;expert&#8217; pattern, an operation that requires knowledge of state should reside in the object that contains the state.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: what</title>
		<link>http://pathfindersoftware.com/2009/03/bean-of-the-devil-arguing-the-affirmative/#comment-9316</link>
		<dc:creator>what</dc:creator>
		<pubDate>Wed, 04 Mar 2009 01:17:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1412#comment-9316</guid>
		<description>&quot;There are other ways to go here, but I think you can see how the tempting getName() led to introduction of file name extension logic here.&quot;

What?!  No, I can&#039;t see that at all.  Are you saying I should not be able to retrieve the textual name of a File?  What if I (*gasp*) wanted to print the name of the file to a JTextArea or JLabel?  What if I wanted to log the name of the file currently being operated on to a log file?  It&#039;s just insanity to remove the ability to convert a File object into its textual representation.  Everywhere I ever needed to work with both a textual representation of the filename and also the File object, I would have to pass two arguments instead of one.  Not to mention the hassle of return values, where you are limited to returning a single argument, so passing both the textual representation and the File object itself is not even an option unless you return an array or some sort of wrapper class, which defeats the purpose of separating them in the first place.

The cause of this poorly designed code is poor design, not Getters and Setters.  Trying to solve design flaws with syntax-level solutions is like trying to turn a 2 year old into a master painter by giving him more expensive paint.</description>
		<content:encoded><![CDATA[<p>&#8220;There are other ways to go here, but I think you can see how the tempting getName() led to introduction of file name extension logic here.&#8221;</p>
<p>What?!  No, I can&#8217;t see that at all.  Are you saying I should not be able to retrieve the textual name of a File?  What if I (*gasp*) wanted to print the name of the file to a JTextArea or JLabel?  What if I wanted to log the name of the file currently being operated on to a log file?  It&#8217;s just insanity to remove the ability to convert a File object into its textual representation.  Everywhere I ever needed to work with both a textual representation of the filename and also the File object, I would have to pass two arguments instead of one.  Not to mention the hassle of return values, where you are limited to returning a single argument, so passing both the textual representation and the File object itself is not even an option unless you return an array or some sort of wrapper class, which defeats the purpose of separating them in the first place.</p>
<p>The cause of this poorly designed code is poor design, not Getters and Setters.  Trying to solve design flaws with syntax-level solutions is like trying to turn a 2 year old into a master painter by giving him more expensive paint.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul B.</title>
		<link>http://pathfindersoftware.com/2009/03/bean-of-the-devil-arguing-the-affirmative/#comment-9315</link>
		<dc:creator>Paul B.</dc:creator>
		<pubDate>Tue, 03 Mar 2009 01:57:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.pathf.com/blogs/?p=1412#comment-9315</guid>
		<description>Ok, you are displaying a grid of orders. The orders have properties such as quantity ordered, date ordered, etc. How are you displaying those properties in the grid?</description>
		<content:encoded><![CDATA[<p>Ok, you are displaying a grid of orders. The orders have properties such as quantity ordered, date ordered, etc. How are you displaying those properties in the grid?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic (User agent is rejected)
Page Caching using memcached (User agent is rejected)

Served from: pathfindersoftware.com @ 2012-02-10 02:13:12 -->
