<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Unpack the bag</title>
	<link>http://www.m3p.co.uk/blog/2008/09/06/unpack-the-bag/</link>
	<description>Working software daily</description>
	<pubDate>Tue, 06 Jan 2009 05:22:26 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: Kent Beck</title>
		<link>http://www.m3p.co.uk/blog/2008/09/06/unpack-the-bag/#comment-291</link>
		<dc:creator>Kent Beck</dc:creator>
		<pubDate>Mon, 08 Sep 2008 14:26:33 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/09/06/unpack-the-bag/#comment-291</guid>
		<description>This pattern makes a lot of sense to me. It follows the principle of declarative expression. Looking at the constructor I can read a declaration of what parts of the context are used.

If only one or two fields are being used, it makes sense to me to do the unpacking in the caller of the constructor. This gives you the option of building an object for test purposes without having to build a whole context. (I wrote about this in http://www.threeriversinstitute.org/AbstractVsConcreteParameters.html). 

In the situation above I would also stay alive to the possibility of an intermediate step: a private constructor that takes three arguments and a public constructor that does the unpacking. This gives me several options--I can make the private constructor public and inline the unpacking constructor or I can make the private constructor public and use it for testing.

Cheers,

Kent</description>
		<content:encoded><![CDATA[<p>This pattern makes a lot of sense to me. It follows the principle of declarative expression. Looking at the constructor I can read a declaration of what parts of the context are used.</p>
<p>If only one or two fields are being used, it makes sense to me to do the unpacking in the caller of the constructor. This gives you the option of building an object for test purposes without having to build a whole context. (I wrote about this in <a href="http://www.threeriversinstitute.org/AbstractVsConcreteParameters.html" rel="nofollow">http://www.threeriversinstitute.org/AbstractVsConcreteParameters.html</a>). </p>
<p>In the situation above I would also stay alive to the possibility of an intermediate step: a private constructor that takes three arguments and a public constructor that does the unpacking. This gives me several options&#8211;I can make the private constructor public and inline the unpacking constructor or I can make the private constructor public and use it for testing.</p>
<p>Cheers,</p>
<p>Kent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve.freeman</title>
		<link>http://www.m3p.co.uk/blog/2008/09/06/unpack-the-bag/#comment-290</link>
		<dc:creator>steve.freeman</dc:creator>
		<pubDate>Sun, 07 Sep 2008 22:16:12 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/09/06/unpack-the-bag/#comment-290</guid>
		<description>@allan. Wow, a minor observation turns out to be a 36-page pattern :), all the forces are there.

As I responded to Frank Carver's pingback, the interesting part of the experience for me was that a small amount of local unpacking revealed some implicit structure. Context Object is obviously a basic pattern, as long it doesn't turn into Singletons With More Syntax.</description>
		<content:encoded><![CDATA[<p>@allan. Wow, a minor observation turns out to be a 36-page pattern :), all the forces are there.</p>
<p>As I responded to Frank Carver&#8217;s pingback, the interesting part of the experience for me was that a small amount of local unpacking revealed some implicit structure. Context Object is obviously a basic pattern, as long it doesn&#8217;t turn into Singletons With More Syntax.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Punch Barrel / When to (and when not to) use a context object</title>
		<link>http://www.m3p.co.uk/blog/2008/09/06/unpack-the-bag/#comment-289</link>
		<dc:creator>The Punch Barrel / When to (and when not to) use a context object</dc:creator>
		<pubDate>Sun, 07 Sep 2008 19:13:12 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/09/06/unpack-the-bag/#comment-289</guid>
		<description>[...] Freeman recently wrote about some of the perils of passing around a &#8220;context&#8221; object, from which different [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Freeman recently wrote about some of the perils of passing around a &#8220;context&#8221; object, from which different [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: allan kelly</title>
		<link>http://www.m3p.co.uk/blog/2008/09/06/unpack-the-bag/#comment-288</link>
		<dc:creator>allan kelly</dc:creator>
		<pubDate>Sun, 07 Sep 2008 15:57:14 +0000</pubDate>
		<guid>http://www.m3p.co.uk/blog/2008/09/06/unpack-the-bag/#comment-288</guid>
		<description>You might be interested in some patterns Kevlin Henney and myself have published on the subject of Context objects.

Mine is Encapsulated Context, you can read it either in Pattern Languages of Program Design (v5, 2006, Manuolsecu) or download it here: http://www.allankelly.net/patterns/encapsulatedcontext.html

Kevlin later refactored that paper as several patterns
http://www.two-sdg.demon.co.uk/curbralan/papers/europlop/ContextEncapsulation.pdf

One of the problems mentioned in these papers is the "kitchen sink" issue, were more and more stuff gets added to the context.  I tried to outline some rules-of-thumb for splitting it up.</description>
		<content:encoded><![CDATA[<p>You might be interested in some patterns Kevlin Henney and myself have published on the subject of Context objects.</p>
<p>Mine is Encapsulated Context, you can read it either in Pattern Languages of Program Design (v5, 2006, Manuolsecu) or download it here: <a href="http://www.allankelly.net/patterns/encapsulatedcontext.html" rel="nofollow">http://www.allankelly.net/patterns/encapsulatedcontext.html</a></p>
<p>Kevlin later refactored that paper as several patterns<br />
<a href="http://www.two-sdg.demon.co.uk/curbralan/papers/europlop/ContextEncapsulation.pdf" rel="nofollow">http://www.two-sdg.demon.co.uk/curbralan/papers/europlop/ContextEncapsulation.pdf</a></p>
<p>One of the problems mentioned in these papers is the &#8220;kitchen sink&#8221; issue, were more and more stuff gets added to the context.  I tried to outline some rules-of-thumb for splitting it up.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
