<?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: Revisiting Fowler&#8217;s Video Store: Making Implicit Concepts Explicit</title>
	<atom:link href="http://blog.symprise.net/2009/03/revisiting-fowlers-video-store-02-making-implicit-concepts-explicit/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.symprise.net/2009/03/revisiting-fowlers-video-store-02-making-implicit-concepts-explicit/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=revisiting-fowlers-video-store-02-making-implicit-concepts-explicit</link>
	<description>Synergising the Enterprise through Software &#38; Management Innovation</description>
	<lastBuildDate>Wed, 30 Nov 2011 18:29:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>By: The Sympriser Blog » Revisiting Fowler&#8217;s Video Store: Adopting Object Oriented Syntax</title>
		<link>http://blog.symprise.net/2009/03/revisiting-fowlers-video-store-02-making-implicit-concepts-explicit/comment-page-1/#comment-20</link>
		<dc:creator>The Sympriser Blog » Revisiting Fowler&#8217;s Video Store: Adopting Object Oriented Syntax</dc:creator>
		<pubDate>Wed, 12 May 2010 03:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://sympriser.wordpress.com/?p=716#comment-20</guid>
		<description>[...] Duke on Revisiting Fowler&#8217;s Video Store: Refactoring Code, Refining AbstractionsRaoul Duke on Revisiting Fowler&#8217;s Video Store: Making Implicit Concepts ExplicitRafael Peixoto de Azevedo on Revisiting Fowler&#8217;s Video Store: Making Implicit Concepts [...]</description>
		<content:encoded><![CDATA[<p>[...] Duke on Revisiting Fowler&#8217;s Video Store: Refactoring Code, Refining AbstractionsRaoul Duke on Revisiting Fowler&#8217;s Video Store: Making Implicit Concepts ExplicitRafael Peixoto de Azevedo on Revisiting Fowler&#8217;s Video Store: Making Implicit Concepts [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Sympriser Blog » Revisiting Fowler&#8217;s Video Store: Refactoring Code, Refining Abstractions</title>
		<link>http://blog.symprise.net/2009/03/revisiting-fowlers-video-store-02-making-implicit-concepts-explicit/comment-page-1/#comment-19</link>
		<dc:creator>The Sympriser Blog » Revisiting Fowler&#8217;s Video Store: Refactoring Code, Refining Abstractions</dc:creator>
		<pubDate>Wed, 12 May 2010 02:17:24 +0000</pubDate>
		<guid isPermaLink="false">http://sympriser.wordpress.com/?p=716#comment-19</guid>
		<description>[...] Duke on Revisiting Fowler&#8217;s Video Store: Refactoring Code, Refining AbstractionsRaoul Duke on Revisiting Fowler&#8217;s Video Store: Making Implicit Concepts ExplicitRafael Peixoto de Azevedo on Revisiting Fowler&#8217;s Video Store: Making Implicit Concepts [...]</description>
		<content:encoded><![CDATA[<p>[...] Duke on Revisiting Fowler&#8217;s Video Store: Refactoring Code, Refining AbstractionsRaoul Duke on Revisiting Fowler&#8217;s Video Store: Making Implicit Concepts ExplicitRafael Peixoto de Azevedo on Revisiting Fowler&#8217;s Video Store: Making Implicit Concepts [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raoul Duke</title>
		<link>http://blog.symprise.net/2009/03/revisiting-fowlers-video-store-02-making-implicit-concepts-explicit/comment-page-1/#comment-7</link>
		<dc:creator>Raoul Duke</dc:creator>
		<pubDate>Thu, 07 May 2009 20:35:31 +0000</pubDate>
		<guid isPermaLink="false">http://sympriser.wordpress.com/?p=716#comment-7</guid>
		<description>@&quot;needs to be re-tested even though it only depends on&quot;

eh, programming is risky, so i would never say less needs to be tested, so i don&#039;t see that as such a solid argument.

however, more &#039;atomic&#039; classes will make things like &quot;who changed this and why?&quot; studies easier in our version control system, and will make it easier to reuse such classes in other contexts perhaps. (the latter going for or against yagni depending on your interpretation of it.)

sincerely.</description>
		<content:encoded><![CDATA[<p>@&#8221;needs to be re-tested even though it only depends on&#8221;</p>
<p>eh, programming is risky, so i would never say less needs to be tested, so i don&#8217;t see that as such a solid argument.</p>
<p>however, more &#8216;atomic&#8217; classes will make things like &#8220;who changed this and why?&#8221; studies easier in our version control system, and will make it easier to reuse such classes in other contexts perhaps. (the latter going for or against yagni depending on your interpretation of it.)</p>
<p>sincerely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rafael Peixoto de Azevedo</title>
		<link>http://blog.symprise.net/2009/03/revisiting-fowlers-video-store-02-making-implicit-concepts-explicit/comment-page-1/#comment-6</link>
		<dc:creator>Rafael Peixoto de Azevedo</dc:creator>
		<pubDate>Wed, 08 Apr 2009 05:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://sympriser.wordpress.com/?p=716#comment-6</guid>
		<description>Hi, Carlo

Thanks again for the comments.

The price and frequent points concerns are already separated by distinct value object functions. When necessary they can be further isolated to distinct value object classes.

We should always be able to adapt the domain model in order to explicitly reproduce the new business reasoning.

If the calculation rules change fundamentally, I would first try to preserve the current solution benefits, by defining new corresponding unified and meaningfully parameterised functions.

Only if the first approach proves inviable, I would consider a class hierarchy and the strategy design pattern.

Cheers,
Rafael</description>
		<content:encoded><![CDATA[<p>Hi, Carlo</p>
<p>Thanks again for the comments.</p>
<p>The price and frequent points concerns are already separated by distinct value object functions. When necessary they can be further isolated to distinct value object classes.</p>
<p>We should always be able to adapt the domain model in order to explicitly reproduce the new business reasoning.</p>
<p>If the calculation rules change fundamentally, I would first try to preserve the current solution benefits, by defining new corresponding unified and meaningfully parameterised functions.</p>
<p>Only if the first approach proves inviable, I would consider a class hierarchy and the strategy design pattern.</p>
<p>Cheers,<br />
Rafael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://blog.symprise.net/2009/03/revisiting-fowlers-video-store-02-making-implicit-concepts-explicit/comment-page-1/#comment-5</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Tue, 07 Apr 2009 13:19:50 +0000</pubDate>
		<guid isPermaLink="false">http://sympriser.wordpress.com/?p=716#comment-5</guid>
		<description>Hi

With point 1 what I meant was that, and again this comes down to YAGNI and what the current requirements state, ideally these 2 concepts would not be tied together.
For example imagine the charge algorithm changes (e.g. takes into consideration how many movies are already out) then the RentalConditions class will be modified and although the code for renter points is not modified it needs to be re-tested even though it only depends on initialTerm and extraPoints. Ideally these 2 concern would be separated.

Regarding the alternative design benefit comment, I know what you are trying to say but for this (deliberately) narrow design example its not obvious to see the benefits. One could argue that the first design is easier to change as although the current requirements make the algorithm be duplicated in multiple places, a future requirement which changes in a different way (not using the parameters int the RentalConditions class i.e. initialTerm etc) for only one &#039;type&#039; of movie (say NewReleases). The NewReleases class changes and the others are left alone.

With the alternative design we would have to either subclass the Value Object and use a Factory to build the correct &#039;version&#039; of the RentalConditions class.

Again I look forward to your next article.
Cheers</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>With point 1 what I meant was that, and again this comes down to YAGNI and what the current requirements state, ideally these 2 concepts would not be tied together.<br />
For example imagine the charge algorithm changes (e.g. takes into consideration how many movies are already out) then the RentalConditions class will be modified and although the code for renter points is not modified it needs to be re-tested even though it only depends on initialTerm and extraPoints. Ideally these 2 concern would be separated.</p>
<p>Regarding the alternative design benefit comment, I know what you are trying to say but for this (deliberately) narrow design example its not obvious to see the benefits. One could argue that the first design is easier to change as although the current requirements make the algorithm be duplicated in multiple places, a future requirement which changes in a different way (not using the parameters int the RentalConditions class i.e. initialTerm etc) for only one &#8216;type&#8217; of movie (say NewReleases). The NewReleases class changes and the others are left alone.</p>
<p>With the alternative design we would have to either subclass the Value Object and use a Factory to build the correct &#8216;version&#8217; of the RentalConditions class.</p>
<p>Again I look forward to your next article.<br />
Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rafael Peixoto de Azevedo</title>
		<link>http://blog.symprise.net/2009/03/revisiting-fowlers-video-store-02-making-implicit-concepts-explicit/comment-page-1/#comment-4</link>
		<dc:creator>Rafael Peixoto de Azevedo</dc:creator>
		<pubDate>Tue, 07 Apr 2009 11:55:33 +0000</pubDate>
		<guid isPermaLink="false">http://sympriser.wordpress.com/?p=716#comment-4</guid>
		<description>Hi, Carlo

Thanks for your comments. They helped me clarify my article.

Now my specific comments about your comments:

--&gt; &quot;1. The RentalConditions have tied together 2 concepts (price and renter points) which most likely have different rates of change.&quot;

The RentalConditions are (immutable) value objects. They never change, they are just replaced by new ones whenever necessary. Therefore, the also called Single Responsibility Principle doesn&#039;t apply here.

--&gt; &quot;2. The concept of ‘movie classification’ is not explicit in both versions which plays a role in deciding what the price is.&quot;

You are right. We will focus our attention on this relevant concept in the next post.

--&gt; &quot;the new design does not really exhibit any real benefit over the first&quot;

The benefits from the alternative design are stated in the Conclusions.

Greetings,
Rafael</description>
		<content:encoded><![CDATA[<p>Hi, Carlo</p>
<p>Thanks for your comments. They helped me clarify my article.</p>
<p>Now my specific comments about your comments:</p>
<p>&#8211;&gt; &#8220;1. The RentalConditions have tied together 2 concepts (price and renter points) which most likely have different rates of change.&#8221;</p>
<p>The RentalConditions are (immutable) value objects. They never change, they are just replaced by new ones whenever necessary. Therefore, the also called Single Responsibility Principle doesn&#8217;t apply here.</p>
<p>&#8211;&gt; &#8220;2. The concept of ‘movie classification’ is not explicit in both versions which plays a role in deciding what the price is.&#8221;</p>
<p>You are right. We will focus our attention on this relevant concept in the next post.</p>
<p>&#8211;&gt; &#8220;the new design does not really exhibit any real benefit over the first&#8221;</p>
<p>The benefits from the alternative design are stated in the Conclusions.</p>
<p>Greetings,<br />
Rafael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlo</title>
		<link>http://blog.symprise.net/2009/03/revisiting-fowlers-video-store-02-making-implicit-concepts-explicit/comment-page-1/#comment-3</link>
		<dc:creator>Carlo</dc:creator>
		<pubDate>Mon, 06 Apr 2009 20:25:17 +0000</pubDate>
		<guid isPermaLink="false">http://sympriser.wordpress.com/?p=716#comment-3</guid>
		<description>Hi

Nice post.
I generally agree with you and I know that this is a simple example and that the context is very important when coming up with alternate designs.

There are a few issues with your implementation though (and admittedly with the initial implementation).

1. The RentalConditions have tied together 2 concepts (price and renter points) which most likely have different rates of change. (Kent Beck talks about this in his book Implementation Patterns).
2. The concept of &#039;movie classification&#039; is not explicit in both versions which plays a role in deciding what the price is.

An alternative design could be a double dispatch model (as the business rules will most likely not sit with just one object).
A movie could have a classification and the price determined by the rental type and the movie classification. There may be a monthly rental contracts, yearly etc which would affect pricing.

Yes admittedly the requirements are not there but this is just an example to show that the new design does not really exhibit any real benefit over the first. They are both pretty easy to understand and change although your design is more parametrized which ties more closely to open-closed principle.

So for completeness, an example of the double dispatch design which would be suitable say if the decision of price varies over more than one type of object i.e. by movie type and rental type...(in Smalltalk)


rental price.

Rental&gt;&gt;price
   ^aMovie classification priceForRental: self.

Classification&gt;&gt;priceFor: rentalDetails
   self subclassResponsibility.

NewReleaseMovie&gt;&gt;priceFor: rentalDetails
   ^rentalDetails priceForNewRelease.

ChildrenMovie&gt;&gt;priceFor: rentalDetails
   ^rentalDetails priceForChildrenMovie.

RegularMovie&gt;&gt;priceFor: rentalDetails
   ^rentalDetails priceForRegularMovie.


Good article though and I agree with your sentiments behind DDD.</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Nice post.<br />
I generally agree with you and I know that this is a simple example and that the context is very important when coming up with alternate designs.</p>
<p>There are a few issues with your implementation though (and admittedly with the initial implementation).</p>
<p>1. The RentalConditions have tied together 2 concepts (price and renter points) which most likely have different rates of change. (Kent Beck talks about this in his book Implementation Patterns).<br />
2. The concept of &#8216;movie classification&#8217; is not explicit in both versions which plays a role in deciding what the price is.</p>
<p>An alternative design could be a double dispatch model (as the business rules will most likely not sit with just one object).<br />
A movie could have a classification and the price determined by the rental type and the movie classification. There may be a monthly rental contracts, yearly etc which would affect pricing.</p>
<p>Yes admittedly the requirements are not there but this is just an example to show that the new design does not really exhibit any real benefit over the first. They are both pretty easy to understand and change although your design is more parametrized which ties more closely to open-closed principle.</p>
<p>So for completeness, an example of the double dispatch design which would be suitable say if the decision of price varies over more than one type of object i.e. by movie type and rental type&#8230;(in Smalltalk)</p>
<p>rental price.</p>
<p>Rental&gt;&gt;price<br />
   ^aMovie classification priceForRental: self.</p>
<p>Classification&gt;&gt;priceFor: rentalDetails<br />
   self subclassResponsibility.</p>
<p>NewReleaseMovie&gt;&gt;priceFor: rentalDetails<br />
   ^rentalDetails priceForNewRelease.</p>
<p>ChildrenMovie&gt;&gt;priceFor: rentalDetails<br />
   ^rentalDetails priceForChildrenMovie.</p>
<p>RegularMovie&gt;&gt;priceFor: rentalDetails<br />
   ^rentalDetails priceForRegularMovie.</p>
<p>Good article though and I agree with your sentiments behind DDD.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

