<?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: 97TESPK: Scoping Methods</title>
	<atom:link href="http://jexp.de/blog/2010/03/scoping-methods/feed/" rel="self" type="application/rss+xml" />
	<link>http://jexp.de/blog/2010/03/scoping-methods/</link>
	<description></description>
	<lastBuildDate>Sat, 14 Apr 2012 08:35:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jens Nerche</title>
		<link>http://jexp.de/blog/2010/03/scoping-methods/comment-page-1/#comment-143</link>
		<dc:creator>Jens Nerche</dc:creator>
		<pubDate>Wed, 10 Mar 2010 14:21:59 +0000</pubDate>
		<guid isPermaLink="false">http://jexp.de/wp/?p=26#comment-143</guid>
		<description>Hi Michael,
it seems your discussion misses some details. Let me play devils advocate and to formulate some protest notes:

Scoping Methods lead to anemic domain models. Because one logical class is spread over some physical classes, each containing some methods, there is no hidden information with public operations on it anymore just like in service-dto-dao-architectures. The former private methods, which operate on the class data, now need dto&#039;s for input and output, no real internal hidden state anymore.

Not only the data isn&#039;t protected anymore, there is also no private method anymore. Things may become visible to far more objects than they should, and it unsafer to change things.

In the same namespace are now far more classes than before, which leads to fat namespaces (packages). And because the lack of any naming convention its not obvious which code belongs together. Before scoping the cohesive code was in one class, now its spread over all the namespace.

The code is now much less readable, now you have to switch between files instead of having it on one screen or scroll some pages up and down. There is also much more syntactic sugar to write and read.

&quot;Transit dependencies&quot; are common: that are dependencies that are injected in the original class - not for the own use, but only to pass them to the newly created method objects (which in turn may pass them only to &lt;i&gt; their &lt;/i&gt; method objects and so on...)

There is no real point for having method &lt;i&gt; objects &lt;/i&gt; - static utility methods could also do the job. They could be imported statically and are in the original class as readable as private methods. And its a heaven for utility methods collection classes. We could also define abstraction levels 1-10 and have a utility method class per abstraction level just as we could have a database table per data type and spread the entity over them ;-&gt; Well, not really....

Perhaps the object oriented paradigm is the wrong one for the abstraction hierarchies you are seeking for. In the described form Scoping Methods is more one of the &quot;97 Bad Ideas Every Programmer Should Know&quot;.

Don&#039;t get me wrong, I&#039;m not trying to bash you or so, I&#039;m just playing the devil to point out some antitheses.

live long and prosper
jens</description>
		<content:encoded><![CDATA[<p>Hi Michael,<br />
it seems your discussion misses some details. Let me play devils advocate and to formulate some protest notes:</p>
<p>Scoping Methods lead to anemic domain models. Because one logical class is spread over some physical classes, each containing some methods, there is no hidden information with public operations on it anymore just like in service-dto-dao-architectures. The former private methods, which operate on the class data, now need dto&#8217;s for input and output, no real internal hidden state anymore.</p>
<p>Not only the data isn&#8217;t protected anymore, there is also no private method anymore. Things may become visible to far more objects than they should, and it unsafer to change things.</p>
<p>In the same namespace are now far more classes than before, which leads to fat namespaces (packages). And because the lack of any naming convention its not obvious which code belongs together. Before scoping the cohesive code was in one class, now its spread over all the namespace.</p>
<p>The code is now much less readable, now you have to switch between files instead of having it on one screen or scroll some pages up and down. There is also much more syntactic sugar to write and read.</p>
<p>&#8220;Transit dependencies&#8221; are common: that are dependencies that are injected in the original class &#8211; not for the own use, but only to pass them to the newly created method objects (which in turn may pass them only to <i> their </i> method objects and so on&#8230;)</p>
<p>There is no real point for having method <i> objects </i> &#8211; static utility methods could also do the job. They could be imported statically and are in the original class as readable as private methods. And its a heaven for utility methods collection classes. We could also define abstraction levels 1-10 and have a utility method class per abstraction level just as we could have a database table per data type and spread the entity over them ;-&gt; Well, not really&#8230;.</p>
<p>Perhaps the object oriented paradigm is the wrong one for the abstraction hierarchies you are seeking for. In the described form Scoping Methods is more one of the &#8220;97 Bad Ideas Every Programmer Should Know&#8221;.</p>
<p>Don&#8217;t get me wrong, I&#8217;m not trying to bash you or so, I&#8217;m just playing the devil to point out some antitheses.</p>
<p>live long and prosper<br />
jens</p>
]]></content:encoded>
	</item>
</channel>
</rss>

