<?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: DefaultValue attribute for Castle MonoRail</title>
	<atom:link href="http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/</link>
	<description>Daniel Hoelbling talks about programming</description>
	<lastBuildDate>Tue, 31 Jan 2012 08:32:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Tigraine &#187; Blog Archive &#187; How MonoRail selects it&#8217;s best ActionMethod candidate: CalculateParamPoints</title>
		<link>http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/comment-page-1/#comment-3267</link>
		<dc:creator>Tigraine &#187; Blog Archive &#187; How MonoRail selects it&#8217;s best ActionMethod candidate: CalculateParamPoints</dc:creator>
		<pubDate>Thu, 27 Aug 2009 13:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/#comment-3267</guid>
		<description>[...] Curran pointed me at one interesting flaw with my implementation of the DefaultValueAttribute for MonoRail I blogged [...]</description>
		<content:encoded><![CDATA[<p>[...] Curran pointed me at one interesting flaw with my implementation of the DefaultValueAttribute for MonoRail I blogged [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Curran</title>
		<link>http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/comment-page-1/#comment-3250</link>
		<dc:creator>James Curran</dc:creator>
		<pubDate>Wed, 26 Aug 2009 13:44:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/#comment-3250</guid>
		<description>Thinking about this more, you are right.  

If we return 0, then 
/Home/Browser.rails?page=2
would probably be a non-match for 
public void Browse([DefaultValue(&quot;beer&quot;)] string category, int page) 
which is not what we want.
However, if we return 10, then for 
/Home/Browser.rails?page=2&amp;source=db
then 
public void Browse([DefaultValue(&quot;beer&quot;)] string category, int page) 
and 
public void Browse(int page, string source) 
become equally good, which is also not what we want.

I think always returning 5 may work best, but mostly I think that this is going to require a bit more investigation of how CalculateParamPoints works.  (I smell at least one of us getting a blog post out of that)</description>
		<content:encoded><![CDATA[<p>Thinking about this more, you are right.  </p>
<p>If we return 0, then<br />
/Home/Browser.rails?page=2<br />
would probably be a non-match for<br />
public void Browse([DefaultValue("beer")] string category, int page)<br />
which is not what we want.<br />
However, if we return 10, then for<br />
/Home/Browser.rails?page=2&amp;source=db<br />
then<br />
public void Browse([DefaultValue("beer")] string category, int page)<br />
and<br />
public void Browse(int page, string source)<br />
become equally good, which is also not what we want.</p>
<p>I think always returning 5 may work best, but mostly I think that this is going to require a bit more investigation of how CalculateParamPoints works.  (I smell at least one of us getting a blog post out of that)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Hölbling</title>
		<link>http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/comment-page-1/#comment-3239</link>
		<dc:creator>Daniel Hölbling</dc:creator>
		<pubDate>Tue, 25 Aug 2009 19:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/#comment-3239</guid>
		<description>Hmm.. actually a tough question.
I&#039;m not totally sold on making it&#039;s weight 0. I see your point with the DefaultValue being a value after all so it shouldn&#039;t matter if a parameter is passed or not, but setting it to 0 would also take away all the weight from that method overload..

I&#039;ll think about it a bit further and maybe we&#039;ll continue this discussion on the castle mailing list :)

Anyway, thanks for your comment!</description>
		<content:encoded><![CDATA[<p>Hmm.. actually a tough question.<br />
I&#8217;m not totally sold on making it&#8217;s weight 0. I see your point with the DefaultValue being a value after all so it shouldn&#8217;t matter if a parameter is passed or not, but setting it to 0 would also take away all the weight from that method overload..</p>
<p>I&#8217;ll think about it a bit further and maybe we&#8217;ll continue this discussion on the castle mailing list <img src='http://www.tigraine.at/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Anyway, thanks for your comment!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Hölbling</title>
		<link>http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/comment-page-1/#comment-3237</link>
		<dc:creator>Daniel Hölbling</dc:creator>
		<pubDate>Tue, 25 Aug 2009 19:07:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/#comment-3237</guid>
		<description>Very good point. I&#039;ll try that out and possibly update the post.</description>
		<content:encoded><![CDATA[<p>Very good point. I&#8217;ll try that out and possibly update the post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Curran</title>
		<link>http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/comment-page-1/#comment-3235</link>
		<dc:creator>James Curran</dc:creator>
		<pubDate>Tue, 25 Aug 2009 19:05:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.tigraine.at/2009/08/04/defaultvalue-attribute-for-castle-monorail/#comment-3235</guid>
		<description>I not sure about this, (as neither you nor Ken really explains CalculateParamPoints), but I think you are saying that, given the method:

public void Browse([DefaultValue(&quot;beer&quot;)] string category, int page)   

then,
/Home/Browser.rails?category=xxxx&amp;page=2

is a better match for that method than 

/Home/Browser.rails?page=2

However, with the DefaultValue, both are equally good.  The DefaultValue attribute shouldn&#039;t affect how good a match a request is to a method, so it really should just return 0 for everything.</description>
		<content:encoded><![CDATA[<p>I not sure about this, (as neither you nor Ken really explains CalculateParamPoints), but I think you are saying that, given the method:</p>
<p>public void Browse([DefaultValue("beer")] string category, int page)   </p>
<p>then,<br />
/Home/Browser.rails?category=xxxx&amp;page=2</p>
<p>is a better match for that method than </p>
<p>/Home/Browser.rails?page=2</p>
<p>However, with the DefaultValue, both are equally good.  The DefaultValue attribute shouldn&#8217;t affect how good a match a request is to a method, so it really should just return 0 for everything.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

