<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://manicprogrammer.com/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>DeusExMachina</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/default.aspx</link><description>Coding like no man has done before.</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Thought of the Day</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/08/01/thought-of-the-day.aspx</link><pubDate>Fri, 01 Aug 2008 20:47:14 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:2567</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/2567.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=2567</wfw:commentRss><description>&lt;p&gt;Isn't loopback a redundancy?&lt;/p&gt;  &lt;p&gt;If it's a &lt;strong&gt;loop&lt;/strong&gt; wouldn't it be &lt;strong&gt;back&lt;/strong&gt; anyway? :)&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=2567" width="1" height="1"&gt;</description></item><item><title>ASP.NET MVC Preview 4 Released</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/07/17/asp-net-mvc-preview-4-released.aspx</link><pubDate>Thu, 17 Jul 2008 02:30:14 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:2326</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/2326.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=2326</wfw:commentRss><description>&lt;ol&gt; &lt;li&gt;Read the Title&lt;/li&gt; &lt;li&gt;Grab while it's &lt;a href="http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=15389"&gt;hot&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;Cheers,&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=2326" width="1" height="1"&gt;</description></item><item><title>ASP.Net MVC ActionFilters</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/07/13/asp-net-mvc-actionfilter-a-natural-validation-resource.aspx</link><pubDate>Sun, 13 Jul 2008 03:20:00 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:2102</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>3</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/2102.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=2102</wfw:commentRss><description>&lt;p&gt;I'm a lame blogger, I know. There's been more than two years that my friend &lt;a href="http://manicprogrammer.com/cs/blogs/heynemann/"&gt;Heynemann&lt;/a&gt; has been teasing me to post more, and it's starting to happen more naturally these times. The reason that I blog less than I'd wish for is that I'm crazy about coding. That's where I tend to focus most of my time, but I'll keep posting more frequently now. The reasoning behind this introduction is to assure all my three readers (you know who you are lol), that my series on .Net MVC will be continuing soon.&lt;/p&gt; &lt;h4&gt;Action Filters - Why and How?&lt;/h4&gt; &lt;p&gt;Action Filters are .Net MVC native way of adding intercepting capabilities to your application. It's a non-imperative way of adding some &lt;a href="http://en.wikipedia.org/wiki/Aspect-oriented_programming"&gt;AOP&lt;/a&gt; to your Controller's Actions without resorting to AOP or IoC frameworks.&lt;/p&gt; &lt;p&gt;It's a sweet move on the part of the development team, and It's something that makes &lt;a href="http://en.wikipedia.org/wiki/Separation_of_concerns"&gt;SoC&lt;/a&gt; and extensibility in .Net MVC very easy to implement.&lt;/p&gt; &lt;p&gt;Well, since the first time I've read about it, I knew it would be a perfect fit to integrate with &lt;a href="http://www.stormwindproject.org/index.php/Validation-Everywhere/Home.html"&gt;ValEver&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;ValEver (short for Validation Everywhere) was one of the neatest pieces of code ever produced by Bernardo and I had the pleasure of developing its integration with Windsor Container some months ago.&lt;/p&gt; &lt;p&gt;I'll try to give some examples here on how to use ActionFilters through implementing integration with ValEver and check on the benefits of this happy union. :D&lt;/p&gt; &lt;p&gt;ActionFilters provide a declarative way to access the executing context prior to, and following, the execution of an action. &lt;/p&gt; &lt;p&gt;It has a simple yet meaningful contract:&lt;/p&gt; &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:500px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt; &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;abstract&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; ActionFilterAttribute : Attribute, IActionFilter&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;{&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#008000;"&gt;// Methods&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;protected&lt;/span&gt; ActionFilterAttribute();&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;virtual&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnActionExecuted(ActionExecutedContext filterContext);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;virtual&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnActionExecuting(ActionExecutingContext filterContext);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;virtual&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnResultExecuted(ResultExecutedContext filterContext);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;virtual&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnResultExecuting(ResultExecutingContext filterContext);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    &lt;span style="color:#008000;"&gt;// Properties&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; Order { get; set; }&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Most methods are self explanatory but the important ones in what I'm trying to achieve are OnActionExecuting and the ActionExecutingContext.&lt;/p&gt;
&lt;p&gt;That's the Pre handler of a Controller's Action call. Through it you can reach the Context and interact with it. &lt;/p&gt;
&lt;p&gt;First thing I did, as any good developer should do, was a test. And so it came:&lt;/p&gt;
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
&lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;[ValEverActionFilter]&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;[ValidationShouldThrow]&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; ActionResult Index([Required(&lt;span style="color:#006080;"&gt;"Supply a valid parameter"&lt;/span&gt;)]&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; parameter1) {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; View();&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The &lt;em&gt;ValidationShouldThrow&lt;/em&gt; and &lt;em&gt;Required(&lt;span style="color:#006080;"&gt;"Supply a valid parameter"&lt;/span&gt;)]&lt;/em&gt; attributes are native from ValEver. The first being a marker to control behaviour, the second being 'The' validation of a parameter.&lt;/p&gt;
&lt;p&gt;And from this test came my custom ValEverActionFilter:&lt;/p&gt;
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:250px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
&lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; ValEverActionFilterAttribute : ActionFilterAttribute {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnActionExecuting(ActionExecutingContext filterContext) {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.OnActionExecuting(filterContext);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This small piece of code is all that's needed. Besides the business logic, which will be added later, all I need are the parameter values . Interestingly we have them. The neat trick here is the context.&lt;/p&gt;
&lt;p&gt;The ActionExecutingContext allows us to direct access to info such as ...&lt;/p&gt;
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
&lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#008000;"&gt;//The calling Action&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; MethodInfo ActionMethod { get; &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt; set; }&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#008000;"&gt;//The parameters and it's values&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; IDictionary&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;object&lt;/span&gt;&amp;gt; ActionParameters { get; &lt;span style="color:#0000ff;"&gt;private&lt;/span&gt;  set; }&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#008000;"&gt;//The request HttpContext &lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; HttpContextBase HttpContext { get; &lt;span style="color:#0000ff;"&gt;internal&lt;/span&gt; set; }&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#008000;"&gt;//Any data regarding the Routing used in the call&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; RouteData RouteData { get; &lt;span style="color:#0000ff;"&gt;internal&lt;/span&gt; set; }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;... being able to manipulate almost anything inside the call's context.&lt;/p&gt;
&lt;p&gt;Then again, I settled to test. But this time I need an integrated test between the Controller Action and the Validation through the call of &lt;em&gt;ValEverActionFilter&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It happens that only calling the Action is not enough. And it makes sense. The controller is not so special alone after all. The ActionFilter calling is done on the Handler instantiation on ASP.NET. &lt;br&gt;"- So, no problem. How hard could it be?" &lt;a href="http://manicprogrammer.com/cs/blogs/heynemann/archive/2008/05/24/stormwind-svn.aspx"&gt;TM&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;After lot of googling I found how hard it was. There's no out-of-the-box solution for this kind of test. So I set to make mine and it came as:&lt;/p&gt;
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:400px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
&lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;[Test]&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; ShouldThrowOnInvalidParameters() {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    TestingController controller = new TestingController();&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;    Assert.Throws&amp;lt;ValitationFailedException&amp;gt;(() =&amp;gt; &lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        controller.InvokeActionWithFilters&amp;lt;TestingController&amp;gt;(p &lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;            =&amp;gt; p.Index(&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Empty)));&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The &lt;em&gt;InvokeActionWithFilters&lt;/em&gt; Extension Method mimics what the ASP.NET does. Supplying defaults and calling the ActionFilter's hooked events in the right time with the right context.&lt;/p&gt;
&lt;p&gt;Then I just had to write the business logic to my filter, and make tests go green.&lt;/p&gt;
&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:250px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
&lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; ValEverActionFilterAttribute : ActionFilterAttribute {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; OnActionExecuting(ActionExecutingContext filterContext) {&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        var methodInfo = filterContext.ActionMethod;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        AddValidationParameters(filterContext, methodInfo);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; isValid = ValidationContext.Validate(filterContext.Controller) &amp;amp;&amp;amp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;                                     ValidationContext.ValidateArguments(methodInfo);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        ThrowIfRequiredByDecoration(isValid, methodInfo);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;        &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.OnActionExecuting(filterContext);&lt;/pre&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Nothing more had to be done to have it interacting with the method call.&lt;br&gt;The &lt;em&gt;filterContext.ActionMethod&lt;/em&gt; contains all the information needed. Parameters and it's values too.&lt;/p&gt;
&lt;p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, despite the little trouble testing the ActionFilters with the call's context, it was easy extend and interact with one of the core aspect of a MVC framework and, better yet, keeping the concerns apart. Just some other cool things you can do with ActionFilters:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cancel Action Execution 
&lt;li&gt;Interact with HttpContext 
&lt;li&gt;Override/fill parameters values 
&lt;li&gt;Set manually your own ActionResult&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;This opens so many possibilities that it makes me glad to see development going in this direction and delivering such good feats.&lt;/p&gt;
&lt;p&gt;The full code of the sample application can be found &lt;a href="http://svn.stormwindproject.org/svn/Personal/jcfigueiredo/ASP.NETMVC_ValEver_Sample/Trunk/Baseline/"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Cheers.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=2102" width="1" height="1"&gt;</description></item><item><title>Lack of Tests</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/07/09/lack-of-tests.aspx</link><pubDate>Wed, 09 Jul 2008 16:40:27 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:2134</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/2134.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=2134</wfw:commentRss><description>&lt;p&gt;You might not hear me, nor &lt;a href="http://en.wikipedia.org/wiki/Kent_Beck"&gt;Mr. Beck&lt;/a&gt; or anyone, but certainly you'll hear Dart Vader:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/WindowsLiveWriter/LackofTests_CE62/LackOfTests_2.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="436" alt="LackOfTests" src="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/WindowsLiveWriter/LackofTests_CE62/LackOfTests_thumb.jpg" width="544" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=2134" width="1" height="1"&gt;</description></item><item><title>When life should imitate fiction :)</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/07/05/when-life-should-imitate-fiction.aspx</link><pubDate>Sat, 05 Jul 2008 17:42:01 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:2042</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/2042.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=2042</wfw:commentRss><description>&lt;p&gt;&lt;embed src="http://www.youtube.com/v/FV_9DTJMFZs" width="425" height="344" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/p&gt; &lt;p&gt;Somewhere, over the rainbow...&lt;/p&gt;&lt;/embed&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=2042" width="1" height="1"&gt;</description></item><item><title>When fiction imitates life...</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/07/05/when-fiction-imitates-life.aspx</link><pubDate>Sat, 05 Jul 2008 17:37:13 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:2041</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>2</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/2041.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=2041</wfw:commentRss><description>&lt;p&gt;&lt;embed src="http://www.youtube.com/v/LYlhCGng5Mk" width="425" height="344" type="application/x-shockwave-flash" wmode="transparent"&gt;&lt;/p&gt; &lt;p&gt;That's how one feels when he's reprehended for Unit Testing. &lt;/p&gt;&lt;/embed&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=2041" width="1" height="1"&gt;</description></item><item><title>ASP.NET MVC Experiences 2, Overview</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/06/30/asp-net-mvc-experiences-2-hands-on.aspx</link><pubDate>Mon, 30 Jun 2008 03:43:57 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1913</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>2</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1913.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1913</wfw:commentRss><description>&lt;p&gt;&lt;strong class="subHeader"&gt;Setting expectations clear&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;What I'm trying to achieve here is not a &amp;quot;how to use&amp;quot; ASP.NET MVC or a Tutorial. For those I really recommend &lt;a href="http://www.asp.net/mvc/"&gt;Scott Hanselman's videos&lt;/a&gt; which were my first source on the subject.&lt;/p&gt;  &lt;p&gt;It's a hands on experience, a &lt;em&gt;spike&lt;/em&gt; if you will, with the most prominent features of the framework.     &lt;br /&gt;It's a evaluation on how it works checking it advantages and disadvantages, from my point of view, and trying reducing some &lt;em&gt;&lt;a href="http://www.ayende.com/Blog/archive/2008/05/16/Zero-Friction--Maintainability.aspx"&gt;friction&lt;/a&gt;&lt;/em&gt; that I'm encountering on using &lt;a href="http://www.castleproject.org/monorail/"&gt;MonoRail&lt;/a&gt; in my new project. Don't get me wrong, I have nothing against MonoRail, it is still the most mature, featured MVC implementation on .Net world and I would not find any friction on it if not checking on .Net MVC features. &lt;/p&gt;  &lt;p&gt;&lt;strong class="subHeader"&gt;Evaluation procedure&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The criterias that I'll use in my evaluation will be, in the following order of importance:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Testability &lt;/li&gt;    &lt;li&gt;&lt;a href="http://en.wikipedia.org/wiki/Separation_of_concerns"&gt;SoC&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Extensibility &lt;/li&gt;    &lt;li&gt;Manageability &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This analysis might not be linear, but these will be the focused points. &lt;/p&gt;  &lt;p&gt;&lt;strong class="subHeader"&gt;Overview&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;First time I heard about .Net MVC and checked out it's features, it looked to me a badly built copy of MonoRail. But I soon realized some very nice differences. Not on the project itself, but the behaviour of P&amp;amp;P conducting it's development. The way they positioned themselves eager to hear the community feedback led to great improvements over the three released iterations. That made me realize the fact that the similarities between them were not coincidental. Maybe the coincidences lie in the fact that they are both implementations of the same pattern, or more likely intentional (unless &lt;a href="http://www.castleproject.org/monorail/documentation/trunk/usersguide/filters.html"&gt;Filters&lt;/a&gt; and &lt;a href="http://code-inside.de/blog-in/2008/04/17/aspnet-mvc-using-a-actionfilter-for-logging/"&gt;ActionFilters&lt;/a&gt; are both Design Patterns affiliated to MVC and I don't know ). &lt;/p&gt;  &lt;p&gt;Anyway, this is good because the transition between them is almost seamless, but that's another topic.&lt;/p&gt;  &lt;h5 style="font-size:11px;color:#ae0f00;letter-spacing:1px;left-padding:2px;"&gt;Application Model&lt;/h5&gt;  &lt;p&gt;Almost everyone I talked about it, thinks that .Net MVC is sitting onto an Application Model of it's own. But the fact is that it's standing over the ASP.NET 2.0 Application model. Just as any other ASP.NET 2.0 application, it inherits from &lt;a href="http://msdn2.microsoft.com/en-us/4wt3wttw"&gt;HttpApplication&lt;/a&gt; and has it's events and life cycle. In fact, the new cool routing system is registered just in &lt;em&gt;Application_Start &lt;/em&gt;as any global register.&lt;/p&gt;  &lt;p&gt;This allows some interesting (and freaking) options as running both WebForm and MVC simultaneously.&lt;/p&gt;  &lt;p&gt;Even though I didn't expect a whole new web platform, I kinda hoped the separation would be a little more clear, not that this clouds the benefits that it provides. What really bother me is finding out that the standard ViewEngine, implemented by the ViewPage, inherits directly from our dear old friend &lt;a href="http://msdn2.microsoft.com/en-us/dfbt9et1"&gt;System.Web.UI.Page&lt;/a&gt;. This open up even freakier possibilities. The fact that you can do the same funky thing that you do with a WebForm on a MVC View really scares the hell out of me.&lt;/p&gt;  &lt;p&gt;First thing a tried when I find that out, was: add a Server form, an asp:button, an event handler and, Voil&amp;#225;: - Back to the same beach we've been swimming the past few years. I know that the fact the you &lt;strong&gt;could&lt;/strong&gt; do something doesn't mean you &lt;strong&gt;should&lt;/strong&gt; or &lt;strong&gt;would&lt;/strong&gt; do it, but it gave me shivers anyway.&lt;/p&gt;  &lt;p&gt;This also showed me that you could add any WebControl you like on the Page, and work with it freely as you would on WebForms but in fact you wouldn't like, more on that later.&lt;/p&gt;  &lt;h5 style="font-size:11px;color:#ae0f00;letter-spacing:1px;left-padding:2px;"&gt;Views&lt;/h5&gt;  &lt;p&gt;As said before, the default ViewEngine is basically a &lt;a href="http://msdn2.microsoft.com/en-us/7ezc17x8"&gt;HttpHandler&lt;/a&gt; inheriting from the standard Page model. That said, one may conclude that anything you can do on a Page could be done on a ViewPage and most can actually be done. Here a some observations about this cross model that I checked:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The layout scheme, as expected is the same MasterPage mechanism used in WebForms. &lt;/li&gt;    &lt;li&gt;Custom controls can be used the same way if you add a server form to the View. &lt;/li&gt;    &lt;li&gt;Yes &lt;strong&gt;YOU HAVE VIEWSTATE&lt;/strong&gt;, but only when adding a server form to the View, otherwise you get a nice clean html to work with. &lt;/li&gt;    &lt;li&gt;You can use UserControls inside a ViewPage, but you'll end up with the whole ViewState/ServerForm stack polluting to your code. &lt;/li&gt;    &lt;li&gt;You've got tracing enabled just as a WebForm. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The above issues worried me a little. ... mixed up model but spaghetti code?&lt;/p&gt;  &lt;p&gt;Then again I remembered that's it's a Microsoft Product anyway. No rants here, just saying that Microsoft is not a charity and as such can't avoid cathering for the main customers in their current business model. This is just something I (and you reader) should bear in mind while reading this.&lt;/p&gt;  &lt;p&gt;The good thing here, is that the View layer was nicely built. Although they allow more than I would like, what is done here is done in a beautiful way. View testing has been somewhat neglected on implementing MVC applications, but here we get a stronger model which we can test and extend in a natural way.&lt;/p&gt;  &lt;p&gt;Some key points on Views:&lt;/p&gt;  &lt;h5&gt;Convention over Configuration&lt;/h5&gt;  &lt;p&gt;The first thing I noticed, and one that made very happy is that ASP.Net MVC Views and setting approach follow strictly the &lt;a href="http://en.wikipedia.org/wiki/Convention_over_Configuration"&gt;CoC&lt;/a&gt; principle. It's is such on MR and should not be changed, so common sense prevailed here for the good.&lt;/p&gt;  &lt;p&gt;The rule here is putting your views on /Views/{controller}/{action} and nothing more needs to be done. It can be changed setting a new ViewLocator, which is a resolver for View's paths.&lt;/p&gt;  &lt;p&gt;Even though everything seems the same, one addition that I really liked is the Shared Views concept, which is so obvious that I'll refrain from explaining.&lt;/p&gt;  &lt;h5&gt;The introduction of the concept of Typed Views.&lt;/h5&gt;  &lt;p&gt;Binding a View to a model seems very natural on MVC. And every view is bound to a model indirectly. The introduced change allows you to strongly-type your View's Data to it's own Model, thus making it more intuitive than generic views, that most of the time aren't really generic. Let's check how's that works.&lt;/p&gt;  &lt;p&gt;That's the code for a view called &lt;em&gt;List&lt;/em&gt; that'll be rendered by the &lt;em&gt;List Action&lt;/em&gt; of the Home Controller.&lt;/p&gt;  &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;   &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;     &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;namespace&lt;/span&gt; Stormwind.MVC.Template.Views.Home {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt;     &lt;span style="color:#cc6633;"&gt;#region&lt;/span&gt; usings&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;using&lt;/span&gt; System.Web.Mvc;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color:#cc6633;"&gt;#endregion&lt;/span&gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;&amp;#160; &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;partial&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; List : Viewpage {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;     }&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;And that's the &lt;em&gt;Template:&lt;/em&gt;&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &amp;lt;%@ Page Language=&lt;span style="color:#006080;"&gt;&amp;quot;C#&amp;quot;&lt;/span&gt; AutoEventWireup=&lt;span style="color:#006080;"&gt;&amp;quot;true&amp;quot;&lt;/span&gt; CodeBehind=&lt;span style="color:#006080;"&gt;&amp;quot;List.aspx.cs&amp;quot;&lt;br /&gt;&lt;/span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Inherits=&lt;span style="color:#006080;"&gt;&amp;quot;Stormwind.MVC.Template.Views.Home.List&amp;quot;&lt;/span&gt; %&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; &amp;lt;ul&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;     &amp;lt;%&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (var pair &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; (IList&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt;)ViewData[&lt;span style="color:#006080;"&gt;&amp;quot;listItem&amp;quot;&lt;/span&gt;]) {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;     %&amp;gt;&amp;lt;li&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;         &amp;lt;%= pair %&amp;gt;&amp;lt;/li&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;     &amp;lt;% } &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;     %&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt; &amp;lt;/ul&amp;gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;There's two important points here:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The first is '&lt;em&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;partial&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; List : ViewUserControl&lt;/em&gt;', notice that the view inherits from a specific base class. Among other things, this base class contain a property call &lt;em&gt;ViewData. &lt;/em&gt;ViewData is nothing more than a KeyValuePair collection that is used to interchange data between the controller and the View. It's almost exactly the same as a MonoRail property bag. &lt;/li&gt;

  &lt;li&gt;The second is ' &lt;em&gt;var pair &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; (IList&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt;)ViewData[&lt;span style="color:#006080;"&gt;&amp;quot;listItem&amp;quot;&lt;/span&gt;]&lt;/em&gt;'. Notice the cast here. As an untyped collection, ViewData items should be casted before used in a not so intuitive way. Worst of all making refactoring harder and the view error prone. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The concept of Typed Views, come to solve these issues. Check it out.&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;partial&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; ListTyped : ViewPage&lt;strong&gt;&amp;lt;List&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt;&amp;gt;&lt;/strong&gt; {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; }&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Notice that the view now inherits '&lt;em&gt;ViewUserControl&amp;lt;List&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt;&amp;gt;&lt;/em&gt;' allowing us to:&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &amp;lt;ul&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt;     &amp;lt;%&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (var pair &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; ViewData.&lt;strong&gt;Model&lt;/strong&gt;) {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     %&amp;gt;&amp;lt;li&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;         &amp;lt;%= pair %&amp;gt;&amp;lt;/li&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;     &amp;lt;% } &lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;     %&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt; &amp;lt;/ul&amp;gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The inherited View sets the Model allowing us working more naturally and refactoring friendly now. 
  &lt;br /&gt;&lt;/p&gt;

&lt;h5&gt;The ability to easily create and change a ViewEngine. &lt;/h5&gt;

&lt;p&gt;Creating and changing View Engines in MonoRail is not too difficult, but changing them in runtime is a little painful and doing that through Windsor makes it feels makes it feel unnatural and definitely not the expected behaviour, or at least one that requires more configuration than expected.&lt;/p&gt;

&lt;p&gt;Creating a new view engine is incredibly easy, since the IViewEngine contract only has one method to implement - The RenderView method.&lt;/p&gt;

&lt;p&gt;Of course, this post does not sums everything that the MVC Framework has to offer, but believe me, there's not much more either. You'll see soon in another post.&lt;/p&gt;

&lt;p&gt;Well, Views are not that different from MonoRail or other MVC implementations, and given you have the ability to implement your own, it's a very flexible structure.&lt;/p&gt;

&lt;h5&gt;Next post: Controllers.&lt;/h5&gt;

&lt;p&gt;Stay tuned.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1913" width="1" height="1"&gt;</description></item><item><title>ASP.NET MVC Experiences - Part 1, The Setup</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/06/26/asp-net-mvc-experiences-part-1-the-setup.aspx</link><pubDate>Thu, 26 Jun 2008 20:09:54 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1904</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>2</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1904.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1904</wfw:commentRss><description>&lt;p&gt;First of all I did what as every developer experienced in the &lt;a href="http://en.wikipedia.org/wiki/RTFM"&gt;RTFM&lt;/a&gt; methodology should do I went to &lt;a href="http://www.asp.net/mvc/"&gt;it's Site&lt;/a&gt; and download the installer.&lt;/p&gt; &lt;p&gt;As I didn't found the binaries and was not in the mood of build the source (oh yeah, there &lt;a href="http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=12640"&gt;is a source available&lt;/a&gt; for a change) I've &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=92F2A8F0-9243-4697-8F9A-FCF6BC9F66AB&amp;amp;displaylang=en#filelist"&gt;downloaded the Installer&lt;/a&gt; just to check it out.&lt;/p&gt; &lt;p&gt;As a I installed the package, the usual &lt;strong&gt;NNF*&lt;/strong&gt;, I was currently happily surprised to find no reference in the GAC. Only changes noticed so far were a new Visual Studio Template called &lt;em&gt;ASP.NET MVC Web Application&lt;/em&gt; and a Start Menu Item &lt;em&gt;Microsoft ASP.NET MVC Preview 3&lt;/em&gt; which leads you the a folder containing the set of assemblies needed to run a ASP.NET MVC Application. (Duh!)&lt;/p&gt; &lt;p&gt;Normally I would go my usual way, creating a new structure using a &lt;a href="http://www.stormwindproject.org/"&gt;Stormwind Project&lt;/a&gt; template and setting the references, but as I've been having a nice user experience so far I've decided to take the full trip MS induced experience.&lt;/p&gt; &lt;p&gt;Open up Visual Studio, selected New Project, Visual C# / Web and ASP.NET MVC Web Application named my Project , and then the first surprise: &lt;/p&gt; &lt;p&gt;&lt;a href="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/WindowsLiveWriter/ASP.NETMVCExperiencesPart1TheSetup_C4F7/asp_mvn_unit_test_setup_2.jpg"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="304" alt="asp_mvn_unit_test_setup" src="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/WindowsLiveWriter/ASP.NETMVCExperiencesPart1TheSetup_C4F7/asp_mvn_unit_test_setup_thumb.jpg" width="456" align="right" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/WindowsLiveWriter/ASP.NETMVCExperiencesPart1TheSetup_C4F7/asp_mvn_unit_test_setup_2.jpg"&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;a href="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/WindowsLiveWriter/ASP.NETMVCExperiencesPart1TheSetup_C4F7/asp_mvn_unit_test_setup_2.jpg"&gt;&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/WindowsLiveWriter/ASP.NETMVCExperiencesPart1TheSetup_C4F7/asp_mvn_unit_test_setup_2.jpg"&gt;&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Yes, it's a nice change see anyone at MS thinking in Test First, but the only test framework supplied is the MS Test. First I got a little angry, but then I realized that it's a MS product after all. :)&lt;/p&gt; &lt;p&gt;Well I'm a NUnit guy and as such I started digging how to &lt;a href="http://blogs.msdn.com/webdevtools/archive/2008/03/06/asp-net-mvc-test-framework-integration-demo.aspx"&gt;make ASP.NET MVC works with another test framework&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;After taking a look at it, and checked out it really works, I decided it was not worth it. &lt;/p&gt; &lt;p&gt;The main issue is exactly the wizard that, for some arcane reason, only is setup to show the Test Framework of your choice, changing a &lt;strong&gt;registry key&lt;/strong&gt;.&lt;/p&gt; &lt;p&gt;Hope you now I didn't like it a bit, so I decided to make &lt;a href="http://stormwind-svn.cvsdude.com/svn/Stormwind.Common/Snippets/JCFigueiredo/AspNetMVCTemplate.zip"&gt;&lt;strong&gt;my own template with the basic structure settled&lt;/strong&gt;&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;Thanks to my friend Bernardo &lt;em&gt;cant-wait-till-you-get -home-so-I-did-it&lt;/em&gt; Heynemann, we already got Windsor container up and running.&lt;/p&gt; &lt;p&gt;Next Post, working with ASP.MVC and overall feeling so far.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;*NNF&lt;/strong&gt;:Next, Next, Finish.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1904" width="1" height="1"&gt;</description></item><item><title>ASP.NET MVC Experiences</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/06/26/asp-net-mvc-experiences.aspx</link><pubDate>Thu, 26 Jun 2008 16:47:27 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1903</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>2</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1903.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1903</wfw:commentRss><description>&lt;p&gt;There&amp;#180;s sometime now there I&amp;#180;ve been wondering toying with the new ASP.NET MVC. I&amp;#180;ve been really impressed with what I&amp;#180;ve been hearing about it, and specially what I&amp;#180;ve been reading in &lt;a href="http://weblogs.asp.net/scottgu"&gt;Scott Guthrie&amp;#180;s blog&lt;/a&gt;, but only after the &lt;a href="http://weblogs.asp.net/scottgu"&gt;RC3&lt;/a&gt; it got me really impressed. &lt;/p&gt;  &lt;p&gt;So I decided to move my fat a$$ a little and do some constructive blogging for a change and create a series of introcdutories and eventually more advanced posts about my experinces with this new toy.&lt;/p&gt;  &lt;p&gt;Stay tuned.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1903" width="1" height="1"&gt;</description></item><item><title>Interface Domains</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/06/22/interface-domains.aspx</link><pubDate>Sun, 22 Jun 2008 08:04:51 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1892</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1892.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1892</wfw:commentRss><description>&lt;p&gt;It a long time since I've been having the idea that the User Interface is a Domain on it's own, and while reading Evan's DDD book it's only getting stronger.&lt;/p&gt; &lt;p&gt;First, when I stumbled on what he calls the &lt;strong&gt;Smart UI Anti-Pattern&lt;/strong&gt;, I got a little disappointed. Not with him or the book, but with myself. &lt;em&gt;Would I be too wrong on that?&lt;/em&gt;&amp;nbsp; &lt;br&gt;Here I quote his words:&lt;/p&gt; &lt;p&gt;&lt;em&gt;"Put all the business logic into the user interface. Chop the application into small functions and implement them as separate user interfaces, embedding the business rules into them. Use a relational database as a shared repository of the data. Use the most automated UI building and visual programming tools available [Evans p.77]."&lt;/em&gt;&lt;/p&gt; &lt;p&gt;But then I started realizing, this only applies when you're dealing with the U.I. as a layer to interact with your Domain, but not as a concept ubiquitously related to it.&lt;/p&gt; &lt;p&gt;Often always the U.I. is the main interaction that the user has with the software. He could interact indirectly with software in other ways, but it's when dealing with the User Interface that he perceives the most business value that he expects when interacting with the software development process. That's one thing that I was always sure about and one of the reasons that I think makes Agile close interactions so invaluable.&lt;/p&gt; &lt;p&gt;But the thing is: &lt;em&gt;&lt;strong&gt;User Interfaces are a Domains on themselves&lt;/strong&gt;&lt;/em&gt;. &lt;/p&gt; &lt;p&gt;And I mean Domain, as Evan's presents it.&lt;/p&gt; &lt;p&gt;Whenever a developer works with a Domain model; a clear, concise, business valued model. He deals with core business concepts. Concepts related with business experts experiences and their knowledge with the problem at hands, and transcribing these knowledge to Interactive Interfaces has to major concern points:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;Even if a team captures the Domain in the most precise way, it's generally when translating it to the U.I. that that is the greatest diffusion between the concept and the implementation.&lt;/li&gt; &lt;li&gt;Grasping business concepts is hard. I had some projects in the past where interviewing business experts separately and together led to two completely different set of responses. But presenting the same people the U.I. (prototyping) led to a fairly greater number of different responses.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;These two points make invaluable the abilities, of:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;create/change the User Interface without affecting core domain concepts. &lt;/li&gt; &lt;li&gt;apply constraints in a way that do not defy business constraints and yet are business constraints on themselves.&lt;/li&gt; &lt;li&gt;present/relate Domain concepts as Entities, Value objects and aggregates without violating the concepts meaning.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Those are small but important points on establishing cohesion between design and implementation, specially on a Web environment, and that why that DDD concept comes to our help again. &lt;/p&gt; &lt;p&gt;In my point of view, the same concepts that's applicable to Business Domain Modeling are applicable to &lt;em&gt;Interface Domain Modeling&lt;/em&gt;.&lt;/p&gt; &lt;p&gt;In a interface you can have: &lt;/p&gt; &lt;ul&gt; &lt;li&gt;Repositories, for retrieving and persisting Interface data.&lt;/li&gt; &lt;li&gt;Services, for complex operations between Interface elements.&lt;/li&gt; &lt;li&gt;Factories for creating Interface elements and components.&lt;/li&gt; &lt;li&gt;Even more advanced concepts as Anti Corruption Layers are applicable as well, when creating Facades for decoupling the use of legacy U.I. components.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Those examples above are specially true when working with &lt;a href="http://en.wikipedia.org/wiki/Rich_Internet_application"&gt;R.I.A.&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Well, as any developer does (or should ;p ) I've started coding these concepts and with that, a new &lt;a href="http://www.stormwindproject.org/"&gt;Stormwind Project&lt;/a&gt; is on it's way and I hoping I'm blogging on it soon.&lt;/p&gt; &lt;p&gt;Stay tuned.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1892" width="1" height="1"&gt;</description></item><item><title>More on DDD and Self Improvement</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/06/14/more-on-ddd-and-self-improvement.aspx</link><pubDate>Sat, 14 Jun 2008 02:56:44 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1857</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1857.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1857</wfw:commentRss><description>&lt;p&gt;Yesterday I &lt;a href="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/06/13/unique-experiences.aspx"&gt;talked on how Evans' book&lt;/a&gt; has been influencing my work, but it's usually on my pet projects and O/S initiatives like those on &lt;a href="http://www.stormwindproject.org/"&gt;Stormwind&lt;/a&gt;. As a employee on a company that works with &lt;a&gt;&lt;strong&gt;C.O.D.*&lt;/strong&gt;&lt;/a&gt; methodology, I have little chance to apply it on usual work. Or at least I thought so.&lt;/p&gt; &lt;p&gt;I used to think that for you to use DDD you had to have you're whole application based on a Domain or it's was a futile initiative. Once again Eric's writings had me eyes opening.&lt;/p&gt; &lt;p&gt;Today I got a peculiar, as peculiar as most of what I do, task. Last week our largest application had experienced some unexpected circumstances whose were out of our control. Nevertheless those circumstances led to a side effect of it sending a 10k error message e-mail in a hour, crashing our customer corporation mail server.&lt;/p&gt; &lt;p&gt;Reasons apart I was settled with the job of first tracking the source of this odd behavior (it was not supposed to behave like that in the oddest of the scenarios) and then modify the error messaging layer to it stops sending multiples e-mails of the same type and source in a short period of time.&lt;/p&gt; &lt;p&gt;I don't agree with the reasons or the way of that, but it was the task assigned and some had to do it. Unfortunately it had come to my lap.&lt;/p&gt; &lt;p&gt;So I started what I do best. Code. But that time the code came a different way.&lt;/p&gt; &lt;p&gt;That's how it started:&lt;/p&gt; &lt;div&gt;First off, we sited and had defined what was a business '&lt;em&gt;Web Exception&lt;/em&gt;' and what identified it as unique on our context.&lt;/div&gt; &lt;div&gt;It was defined that a &lt;em&gt;&lt;strong&gt;Unique Web Exception&lt;/strong&gt;&lt;/em&gt; was an Exception triggered from a &lt;em&gt;&lt;strong&gt;Page&lt;/strong&gt; &lt;/em&gt;of a &lt;em&gt;&lt;strong&gt;Type&lt;/strong&gt; &lt;/em&gt;in a &lt;strong&gt;&lt;em&gt;Defined Interval&lt;/em&gt; &lt;/strong&gt;.&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;Without realizing it, I was defining my tiny Domain, and my first (and only) Entity.&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;And so the Code begun with the Model:&lt;/div&gt; &lt;div&gt;&amp;nbsp;&lt;/div&gt; &lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; WebTriggeredException {
    
    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;int&lt;/span&gt; Code { get; set; }
    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; Type ExceptionType { get; set; }
    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; DateTime? LastRaisedDate { get; set; }
    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; Page { get; set; }
}&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Unconsciously I was defining my Domain and it's definitions. &lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Then came the Domain infrastructure in the form of a Service and Repository. But the thing was I not persisting it to a RDBMS. I was persisting it to Memory; Session to be more precise (not my decisions I should note). Without caring with the media it was persisted I was using the right patterns to the right job. Respecting the boundaries and concerns of my domain.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;The fact was that in a hour and a half I had almost done with the task (the fun part at least) and the business logic resumed to: &lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;override&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; HandleWebException(Exception sourceEx, 
                        &lt;span style="color:#0000ff;"&gt;long&lt;/span&gt; applicationId, 
                        &lt;span style="color:#0000ff;"&gt;bool&lt;/span&gt; isDevelopment, 
                        &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;[] usersToReceive) {

    &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (!&lt;strong&gt;WebTriggeredExceptionService&lt;/strong&gt;.&lt;strong&gt;ExceptionWasRaisedInLast10Minutes&lt;/strong&gt;(sourceEx)) {
        &lt;strong&gt;WebTriggeredExceptionService&lt;/strong&gt;.&lt;strong&gt;RegisterException&lt;/strong&gt;(sourceEx);
        &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;.HandleWebException(sourceEx, applicationId, isDevelopment, usersToReceive);
    }
}
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Abstracting that I was almost writing a Facade to encapsulate an already existing logic, I managed to arrange it in a structure that applied most of the concepts that I've read in the past two weeks. And didn't notice that until it was done.&lt;/p&gt;
&lt;p&gt;Can't stop saying that I'm please with myself, but what really pleases me is that I'm only halfway the book and if things keeps coming like that, I'll be a better programmer by the end of the month. lol&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;a name="cod"&gt;*Cost Driven Development&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1857" width="1" height="1"&gt;</description></item><item><title>Unique Experiences</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/06/13/unique-experiences.aspx</link><pubDate>Fri, 13 Jun 2008 02:17:24 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1846</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>1</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1846.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1846</wfw:commentRss><description>&lt;p&gt;It's being two weeks that I've been reading Eric Evans DDD book, and it's been a pleasant time.&lt;/p&gt; &lt;p&gt;More or less at the same time I started a new Project (more on that later), and it was impressive how his writings has already influenced my work.&lt;/p&gt; &lt;p&gt;I've wiped out all my Domain code three times since I've started reading, more on less on the same time I ended each chapter.&lt;/p&gt; &lt;p&gt;In fact my Domain had not changed much, but the way the Entities related to each other having my aggregates boundaries clearer.&lt;/p&gt; &lt;p&gt;The same way I've embraced the Knowledge Crunching process, and every time I started rewriting it, more defined the interactions, behaviors, rules and scope became. More palpable too. &lt;/p&gt; &lt;p&gt;I've already read about DDD from other sources and had long talks with friends about it, but it's different experiencing reading the original work. The way Evan writes, with real circumstances and real issues, is a breath of fresh air after a very dry season. I've been feeling like a man who stood on the shadow under a tree looking to the sunset, but only now coming out to the sun.&lt;/p&gt; &lt;p&gt;A unique experience indeed.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1846" width="1" height="1"&gt;</description></item><item><title>Talking about Link</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/05/08/talking-about-link.aspx</link><pubDate>Thu, 08 May 2008 14:45:57 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1499</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1499.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1499</wfw:commentRss><description>&lt;p&gt;My friend &lt;a href="http://manicprogrammer.com/cs/blogs/heynemann"&gt;Heynemann&lt;/a&gt; just sent me the most cool list of &lt;a href="http://blog.windows2.webhome.at/post/2008/04/LINQ-to-AnyWhere.aspx"&gt;Linq fo AnyWhere&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The one&amp;#180;s I&amp;#180;m really interested in are:   &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://www.codeplex.com/LinqOverCSharp"&gt;LINQ over C# project&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://www.ayende.com/Blog/archive/2007/03/17/Implementing-Linq-for-NHibernate-A-How-To-Guide--Part.aspx"&gt;LINQ to NHibernate&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://blog.joefeser.com/post/Linq-To-NCover-Part-2.aspx"&gt;LINQ to NCover&lt;/a&gt;    &lt;br /&gt;&lt;a href="http://www.codeplex.com/metalinq"&gt;LINQ to Expressions&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Hope it Helps.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1499" width="1" height="1"&gt;</description></item><item><title>Linq to NCover</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/05/07/linq-to-ncover.aspx</link><pubDate>Thu, 08 May 2008 01:31:38 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1496</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>357</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1496.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1496</wfw:commentRss><description>&lt;p&gt;Recently I've seeing some wicked stuff done with Linq, but this one is, to say the least, Outstanding.&lt;/p&gt; &lt;p&gt;&lt;a href="http://blog.joefeser.com/"&gt;Joe Feser&lt;/a&gt; released this &lt;a href="http://blog.joefeser.com/post/Linq-To-NCover-Part-2.aspx"&gt;Linq to NCover&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;Doing stuff like:&lt;/p&gt; &lt;div&gt;&lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;CodeCoverage c = CodeCoverage.Load(file);

var retVal =from mod &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; c.Modules
            from cls &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; mod.Classes
            from method &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; cls.Methods
            &lt;span style="color:#0000ff;"&gt;where&lt;/span&gt; method.Name == &lt;span style="color:#006080;"&gt;".ctor"&lt;/span&gt;
            select method;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Is, somewhat, surreal.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1496" width="1" height="1"&gt;</description></item><item><title>Bug of the Day</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/02/14/bug-of-the-day.aspx</link><pubDate>Fri, 15 Feb 2008 02:20:08 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1276</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>174</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1276.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1276</wfw:commentRss><description>&lt;p&gt;Something -a bug- happened today that made feel like weeping.&lt;/p&gt;  &lt;p&gt;One of those nasty bugs that when you catch it, make's you scream like you have won a war.&lt;/p&gt;  &lt;p&gt;I'm working on a Project that I was not involved on it's basic definition. And in cases like that some hidden stuff always pop out.    &lt;br /&gt;    &lt;br /&gt;Based on a DDD approach this project has a module entirely delivered by Services, which are IoC'ed with Windsor on it's clients.&amp;#160; So far no big deal.     &lt;br /&gt;    &lt;br /&gt;But last night, our QA team was validation a particular routine which was giving lot of Developers headaches.     &lt;br /&gt;    &lt;br /&gt;When I was presented to the the Bug I started digging on this project's foundation.     &lt;br /&gt;    &lt;br /&gt;The maddening piece of code was something like that:&lt;/p&gt;  &lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;   &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;     &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;&lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt;(ScheduledItem item &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; items) {&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;    IoC.resolve&amp;lt;IClass&amp;gt;().Do(item.stuff);&lt;/pre&gt;

    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;}&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The problem was that with every Iteration I received an error. Random.&lt;/p&gt;

&lt;p&gt;Sometimes it was and PL/SQL error, sometime a null reference error, sometimes neither. 
  &lt;br /&gt;

  &lt;br /&gt;I got stuck with it for some hours. 

  &lt;br /&gt;

  &lt;br /&gt;Just when I thought that was closing on becoming crazier, my salvation came in form of another error.&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;System.ArgumentException: An entry with the same key already exists.&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Hell, how I loved watching this. Haven't been so happy in seeing and error message in sometime. At least, knowing some Internals of the .Do() method, I could elaborate on what was happening. 
  &lt;br /&gt;

  &lt;br /&gt;well, to make a long story short, my issue was that when adding the components on Windsor container, all services were being injected with a Binsor script adding all of then with:&lt;/p&gt;

&lt;div style="border-right:gray 1px solid;padding-right:4px;border-top:gray 1px solid;padding-left:4px;font-size:8pt;padding-bottom:4px;margin:20px 0px 10px;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;max-height:200px;line-height:12pt;padding-top:4px;border-bottom:gray 1px solid;font-family:consolas, 'Courier New', courier, monospace;background-color:#f4f4f4;"&gt;
  &lt;div style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none;"&gt;
    &lt;pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none;"&gt;AddComponentWithLifestyle(&lt;span style="color:#006080;"&gt;&amp;quot;Class&amp;quot;&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;typeof&lt;/span&gt;(Class),IClass, LifestyleType.Singleton) ;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Dang. Every second time &lt;em&gt;IoC.resolve&amp;lt;IClass&amp;gt;().Do(item.stuff)&lt;/em&gt;&amp;#160; was called, with &lt;strong&gt;all-internal-fields-populated&lt;/strong&gt; I got an error. 

  &lt;br /&gt;

  &lt;br /&gt;It turns out that that's the 'One Service' which has private fields outside the Service's Operation and those fields were never reset on the new method's call. 

  &lt;br /&gt;The error was random because the behavior of the method depend's on the item passed as parameter. 

  &lt;br /&gt;

  &lt;br /&gt;After that, I changed the LifeStyle to LifestyleType.Transient, which generates a new instance (no worries on performance here, it's an batch schedule operation) every call, and everything went fine. 

  &lt;br /&gt;

  &lt;br /&gt;I felt ok after that, but it was one of those moments when one thinks: 

  &lt;br /&gt;- &amp;quot;if I was involved from the beginning at least I would know where to look at&amp;quot;.&lt;/p&gt;

&lt;p&gt;Sad, but true.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1276" width="1" height="1"&gt;</description></item><item><title>When your foundation is good...</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/02/14/when-your-foundation-is-good.aspx</link><pubDate>Fri, 15 Feb 2008 01:28:49 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1275</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>1</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1275.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1275</wfw:commentRss><description>&lt;p&gt;Just assembling my coding environment on my new-old (bought it from Heynemann, when he left to UK) computer.&lt;/p&gt;  &lt;p&gt;Once again StormWind made my life easier.   &lt;br /&gt;    &lt;br /&gt;Just download our code form &lt;a href="http://stormwind-svn.cvsdude.com/svn"&gt;svn repository&lt;/a&gt;, set up nant path and, Voil&amp;#225;:    &lt;br /&gt;- Everything's working just fine, thank you.    &lt;br /&gt;    &lt;br /&gt;Every project, every test, fxcop, ndpend, Everything!    &lt;br /&gt;    &lt;br /&gt;Our build configuration structure is so neat,&amp;#160; that I need nothing more then two actions to have it working on a brand new environment.    &lt;br /&gt;    &lt;br /&gt;Should blog about that someday.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1275" width="1" height="1"&gt;</description></item><item><title>StormWind and Enterprise Applications</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/02/14/stormwind-and-enterprise-applications.aspx</link><pubDate>Thu, 14 Feb 2008 03:59:39 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1271</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>1</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1271.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1271</wfw:commentRss><description>&lt;p&gt;I've reached a point in my life of great changes and as the smart person that I like to think I am, I concluded that it's time for some reconsideration.&lt;/p&gt; &lt;p&gt;Don't get me wrong. I've always had the habit of continuously reevaluate my actions and decisions, but it was mostly on the personal side of my life. Professionally&amp;nbsp; it's no that so.&lt;/p&gt; &lt;p&gt;Not that I'm not aware of the needs of the path I choose as a professional, but precisely because the continuous improvement demanded for someone working on Application Development nowadays, make it's absolutely necessary that every time, every day, every minute you make that minute a moment of improvement on the total knowledge you have. So sometime's I thing that learning is enough as a professional refinement, but&amp;nbsp; I've not agreeing with that lately.&lt;/p&gt; &lt;p&gt;What I mean by reconsideration is more of the career aspect of my professional life.&lt;/p&gt; &lt;p&gt;I always praised myself as a professional who've been through the whole application development lifecycle, and I still think that's true.&lt;/p&gt; &lt;p&gt;I've been a developer from most of my professional life (currently about 13 years), but as any life it was full of up's and down's and sometimes I was leaded to take some paths that I did not intended to.&lt;/p&gt; &lt;p&gt;Not that it's a bad thing, I'd like to learn every thing I can from any experience I have. Good or Bad. &lt;br&gt;&lt;br&gt;I've been, Coding, design application,writing specification -some technical some non-technical-, testing, working on QA with UAT, managing projects from a political and non-political perspective. I've worked or been in touch of a vast set of technologies that made my think-outside-the-box way of being, feels like natural.&lt;br&gt;I even had my own startup for some three years, which made me consider things from a whole new point of view almost on daily basis.&lt;br&gt;&lt;br&gt;But lately I've been questioning myself more and more often:&lt;br&gt;- Where it'll lead me to?&lt;br&gt;&lt;br&gt;So I decided that to get this answer I'll take as a first step, and not a quick one,&amp;nbsp; reevaluate my skills.&lt;/p&gt; &lt;p&gt;As a member, and co-founder of the &lt;a&gt;StormWind Project&lt;/a&gt;, one of the things that I'm more proud to be part of, I'll start another project, one focused on being an Enterprise Application, witch I'll try Posting every step from it's conception to it's delivery and make a self analysis of my skill's and experiences in the specific area that I'll be working with, and the way I'll feel about it.&lt;/p&gt; &lt;p&gt;Keep tuned.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1271" width="1" height="1"&gt;</description></item><item><title>Heynemann @ TW</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2008/02/14/heynemann-tw.aspx</link><pubDate>Thu, 14 Feb 2008 03:20:55 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1270</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1270.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1270</wfw:commentRss><description>&lt;p&gt;Mr &lt;a href="http://manicprogrammer.com/cs/blogs/heynemann/"&gt;B. Heynemann&lt;/a&gt;, ToughtWorker.&lt;/p&gt; &lt;p&gt;Dude, Gratz!&lt;/p&gt; &lt;p&gt;Developer level 71, and counting. :D&lt;/p&gt; &lt;p&gt;Hope you and your Lady, every luck in the world and that you keep rox'ing as always!&lt;/p&gt; &lt;p&gt;glhfgg! &lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1270" width="1" height="1"&gt;</description></item><item><title>My Friend is a ThoughtWorker</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2007/11/12/my-friend-is-a-thoughtworker.aspx</link><pubDate>Mon, 12 Nov 2007 21:14:20 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1161</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>2</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1161.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1161</wfw:commentRss><description>&lt;p&gt;It's with great pleasure that I announce that our dear friend &lt;a href="http://manicprogrammer.com/cs/blogs/heynemann"&gt;Heynemann&lt;/a&gt; just got hired by &lt;a href="http://www.thoughtworks.com/"&gt;Thoughtworks&lt;/a&gt;.&lt;br&gt;&lt;br&gt;&lt;a href="http://manicprogrammer.com/cs/blogs/heynemann/archive/2007/11/12/i-m-a-thoughtworker.aspx"&gt;Read more here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;I've been with him through most of the process being as supportive as I could and encouraging him the most I was capable of.&lt;/p&gt; &lt;p&gt;No need at all. &lt;/p&gt; &lt;p&gt;It only proves that we're right in hope, and sometimes it's all we got, that COMPETENCY PAYS OFF!&lt;/p&gt; &lt;p&gt;Even being a big responsibility, and one I think that he's fully up to, that's a path that I think that leads only one way: - Success. &lt;/p&gt; &lt;p&gt;Man, all my very best wishes that you keep doing as good as you ever had and get nothing but the best time of your life.&lt;/p&gt; &lt;p&gt;Your pal.&lt;br&gt;CF&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1161" width="1" height="1"&gt;</description></item><item><title>Ayend 'Oren' Raien, a really weird guy...</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2007/09/27/ayend-oren-raien-a-really-weird-guy.aspx</link><pubDate>Thu, 27 Sep 2007 02:52:02 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1091</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1091.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1091</wfw:commentRss><description>&lt;p&gt;&lt;br&gt;Oren Eini, aka &lt;a href="http://www.ayende.com/Blog/"&gt;Ayend Rahien&lt;/a&gt;, is a really, really weird guy.&lt;br&gt;&lt;br&gt;The Geniuses weird kind I think, but weird nevertheless.&lt;/p&gt; &lt;p&gt;Despite the fact that he writes at least 5 blog posts a day (almost all of them very insightfully), code amazing stuff, being &lt;a href="http://www.ayende.com/projects/rhino-mocks.aspx"&gt;Rhino Mocks&lt;/a&gt; one of them, he's also the kind that code &lt;a href="http://www.ayende.com/Blog/archive/2007/09/25/The-quotI-am-really-not-drunkquot-post.aspx"&gt;just to prove that he's not drunk&lt;/a&gt;! &lt;/p&gt; &lt;p&gt;I've done much drunk coding in the past (not any longer that I'm a respectful married guy =} ), but never coded just to prove that I wasn't. lol&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1091" width="1" height="1"&gt;</description></item><item><title>Twisted minds on I.T. field</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2007/09/26/twisted-minds-on-i-t-field.aspx</link><pubDate>Thu, 27 Sep 2007 01:37:38 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1090</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1090.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1090</wfw:commentRss><description>&lt;p&gt;Tonight I was laying in my bed with my wife, both of us reading. She was reading a data structures book and I was catching up on my daily feeds. For some it would be a strange scene, but I take it as a natural one when both of a couple works on I.T. field.&lt;/p&gt; &lt;p&gt;At some point I looked at the page she was reading and saw a &lt;a href="http://en.wikipedia.org/wiki/Entity-relationship_model"&gt;ERD&lt;/a&gt;, and was a pretty simple one. Basic stuff indeed.&lt;/p&gt; &lt;p&gt;What really caught my attention was that the following relationship was show as an example of ERD:&lt;/p&gt; &lt;p&gt;&lt;a href="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/WindowsLiveWriter/TwistedmindsonI.T.field_13EC9/diagrama%20morbido.jpg"&gt;&lt;img style="border-right:0px;border-top:0px;border-left:0px;border-bottom:0px;" height="155" alt="diagrama morbido" src="http://manicprogrammer.com/cs/blogs/claudiofigueiredo/WindowsLiveWriter/TwistedmindsonI.T.field_13EC9/diagrama%20morbido_thumb.jpg" width="494" border="0"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Sometimes it strikes how odd enough we are without any help of this kind. lol&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1090" width="1" height="1"&gt;</description></item><item><title>Happy Birthday...</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2007/09/12/happy-birthday.aspx</link><pubDate>Wed, 12 Sep 2007 02:52:31 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1071</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1071.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1071</wfw:commentRss><description>&lt;p&gt;... and all my wish of health, happiness and lots of money (lol !) to my Dear friend &lt;a href="http://manicprogrammer.com/cs/blogs/heynemann"&gt;Bernardo Heynemann&lt;/a&gt;!!  &lt;p&gt;Dude! It's one of the top things in the last years of my life meeting you and becoming your friend!  &lt;p&gt;Binário FTW! :)&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1071" width="1" height="1"&gt;</description></item><item><title>Stormwind Project FTW</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2007/09/04/stormwind-project-ftw.aspx</link><pubDate>Tue, 04 Sep 2007 18:04:36 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1054</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1054.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1054</wfw:commentRss><description>&lt;p&gt;It´s with great pleasure and&amp;nbsp;honor that I announce that the &lt;a href="http://www.stormwindproject.org"&gt;Stormwind Project Community&lt;/a&gt; Portal was born today.  &lt;p&gt;It´s a&amp;nbsp;awesome feeling to be part of something that big and i´d like to give my Greatest THANK YOU to my Pal &lt;a href="http://manicprogrammer.com/cs/blogs/heynemann/"&gt;Heynemann&lt;/a&gt; for letting me give my&amp;nbsp;humble contribution&amp;nbsp;to this major effort.  &lt;p&gt;Hope you guys and gals&amp;nbsp;still keep tuned ´cause great things are on the way.&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1054" width="1" height="1"&gt;</description></item><item><title>Meetings</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2007/08/30/meetings.aspx</link><pubDate>Thu, 30 Aug 2007 23:42:48 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1039</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1039.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1039</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;table cellspacing="0" cellpadding="2"&gt;  &lt;tr&gt; &lt;td&gt;First One:&lt;/td&gt; &lt;td&gt;09:00 - 14:00&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Second:&lt;/td&gt; &lt;td&gt; &lt;p&gt;14:00 - 17:00&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Some yadayada...&lt;/td&gt; &lt;td&gt;17:00 - 17:30&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;p dir="ltr" style="margin-right:0px;"&gt;Third:&lt;/p&gt;&lt;/td&gt; &lt;td&gt;17:30 - 18:30&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;REAL work----&amp;gt;&lt;/td&gt; &lt;td&gt;18:30 - 21:00&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; &lt;p&gt;And&amp;nbsp;&lt;a href="http://thoughtadrian.blogspot.com/2007/06/10-attributes-of-well-run-meetings.html"&gt;Mr. Adrian&lt;/a&gt;&amp;nbsp;still worries about the right Meeting...&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1039" width="1" height="1"&gt;</description></item><item><title>MS Brainwasher</title><link>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/archive/2007/08/30/ms-brainwasher.aspx</link><pubDate>Thu, 30 Aug 2007 02:22:12 GMT</pubDate><guid isPermaLink="false">d10481e0-d7e7-4234-9ab6-db53a9657b7e:1038</guid><dc:creator>claudio.figueiredo</dc:creator><slash:comments>0</slash:comments><comments>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/comments/1038.aspx</comments><wfw:commentRss>http://manicprogrammer.com/cs/blogs/claudiofigueiredo/commentrss.aspx?PostID=1038</wfw:commentRss><description>&lt;p&gt;- In the Beginning there was The CGI.  &lt;p&gt;(At least for me.)  &lt;p&gt;Some times i get surprise by how the&amp;nbsp;sum of our experiences changes us without noticing that a change even happened.&lt;br&gt;The change sometimes is so profound that one could swear that nothing had ever changed at all. That&amp;nbsp;things&amp;nbsp;are, and always&amp;nbsp;were the way they are.&lt;br&gt;Some weeks ago i was faced with a singular problem (the kinds that make us want to jump through the window!). I had a Webform, with a DropDown&amp;nbsp;list that was loaded after an event triggered in the form by a DatePicker-like&amp;nbsp;control being both of then inside an UpdatePanel. So far so good.  &lt;p&gt;Than came one user (I’m one of those 'blame the user' guy, I gotta admit it), and made the simplest of the requests:  &lt;p&gt;"- I'd like to have the dropdown list loaded not when i change the date in the DatePicker, I’d like to have it changed only when i click the DDL. When my date change's, I’d like it only being cleared."  &lt;p&gt;- Ok. I said. Nothing too difficult.  &lt;p&gt;I though:  &lt;p&gt;"Sure too easy. Just hookup the load method in the OnClick event of the DDL."  &lt;p&gt;So it happens that i just realized, that there is no server-side OnClick in DDL.  &lt;p&gt;"Ok.." -&amp;nbsp;i thought - " just gotta add a client side onclick call to the DDL, and make it call the __doPostBack(). Easy."  &lt;p&gt;Not really.  &lt;p&gt;So it happens that Ajax.Net doesn't like being bypassed. The callback wasn't fired and i've got to trick it a little bit.&lt;br&gt;Ok, I’m used to trick Webform's. I've being doing it since Asp.Net 1.0, so it was no news.  &lt;p&gt;After messing around for an uncomfortable few hours I’ve&amp;nbsp;got it working.  &lt;p&gt;Then, being Agile as i never was, I’ve called my user (oh, dear user!) t show him the job 'done'. He watched when i presented the new behavior and said:  &lt;p&gt;“- Ok, that's it. Just one little problem. The DDL still need to be opened when the content reloads."  &lt;p&gt;Ok then. It's not a trivial task since DOM doesn't give tools for that job, but i'm smarter than DOM.  &lt;p&gt;First of all i recurred to own set of tools, being &lt;a href="http://extjs.com/"&gt;ExtJs&lt;/a&gt; and &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt; some of them. I already knew that Ext would do the Magic of expanding a DropDown for me, so I thought (you already know how I like thinking, don't you? =} ):  &lt;p&gt;- "Yeah, right. Just gotta hook the reload event of the UpdatePanel to the ext.combobox.expand() method, and it'll be allright."  &lt;p&gt;How fool am i? How fool for believing such an event exists. How fool for trusting M.S. (&lt;a href="http://ayende.com/Blog/archive/2007/06/13/Good-Little-Developer-do-what-you-are-told.aspx"&gt;Mort&lt;/a&gt; Softwares) that everything woul do nicely working with GREAT Ajax.Net.  &lt;p&gt;After that i had a really hard time. Trying to bind things with such heterogeneous frameworks&amp;nbsp;as Ajax.Net and, huh, 'EVERYTHING ELSE' is not for the faint of the heart.&lt;br&gt;In the end i had given up trying to make then speak to each other and rebuilt the load method required by the DDL as an xml-spiting-handler and bound it to the ExtJs ComboBox, applied to a Webforms DDL, with it's native Ajax Calls and, after that, I’ll I needed to do was:  &lt;p&gt;Combo.on('load',function(){&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.expand();&lt;br&gt;});&lt;br&gt;Ok, i had it! Just the behavior that my friendly user asked!! &amp;nbsp;  &lt;p&gt;Cool, everything was fine, ok? &lt;br&gt;- NOT!!!!!!!  &lt;p&gt;No, it wasn't. And here let me starting explaining why I’m entitling this post as MS Brainwasher.&lt;br&gt;After struggling with tiers that i knew pretty well (being Ajax.Net the least known), and doing something that I’ve being doing for the last eight or nine years, that I’ve done with even Perl,&amp;nbsp;I had&amp;nbsp;a fight that I’m not so sure&amp;nbsp;I had to endure, and definitely I didn't like it.  &lt;p&gt;So to describe my feeling for all of it,’ I’ll tell how it ended.  &lt;p&gt;When testing, everything was working smoothly,&amp;nbsp;everything but getting the value of DDL.SelectValue. Nothing i did worked. Nothing.  &lt;p&gt;Because it was almost midnight, because i was tired and hungry and because if looked&amp;nbsp;one more time at that code i was throwing myself from my window,&amp;nbsp;I decided to ask my dear friend &lt;a href="http://manicprogrammer.com/cs/blogs/heynemann"&gt;Heynemann&lt;/a&gt; for a help, by wich he replied:  &lt;p&gt;"Why don’t you get it's value by querystring?"  &lt;p&gt;I felt stupid. More stupid then i felt in some time.  &lt;p&gt;When bypassing the Webforms own methods to reload the DDL, he was not reflecting the change in a way that the webform was understanding, that i already knew, but not considering obtaining the value trough a simple Request.QueryString&amp;nbsp;was&amp;nbsp;too much for me.  &lt;p&gt;That's it fellas. MS not being content writing tool for Morts want's us all turning into Morts as well.  &lt;p&gt;Something, which they’ll never do with me! For sure!&lt;/p&gt;&lt;img src="http://manicprogrammer.com/cs/aggbug.aspx?PostID=1038" width="1" height="1"&gt;</description></item></channel></rss>