<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Microsoft</title>
        <link>http://ayende.com/Blog/category/480.aspx</link>
        <description>Microsoft</description>
        <language>en-US</language>
        <copyright>Ayende Rahien</copyright>
        <managingEditor>Ayende@ayende.com</managingEditor>
        <generator>Subtext Version 2.0.0.43</generator>
        <item>
            <title>On ASP.Net MVC (yes, again :-))</title>
            <link>http://ayende.com/Blog/archive/2008/11/12/on-asp.net-mvc-yes-again.aspx</link>
            <description>&lt;p&gt;As you probably know by now, I have been working on an ASP.Net MVC project for the last two weeks. Based on that, I think that I can base a pretty good opinion about it.&lt;/p&gt;
&lt;p&gt;Are you ready for it?&lt;/p&gt;
&lt;p&gt;[insert significant pause here]&lt;/p&gt;
&lt;p&gt;I like it.&lt;/p&gt;
&lt;p&gt;Now, just to be clear. I like it not only in comparison to WebForms. I like it &lt;em&gt;on its own&lt;/em&gt;. In other words, I don't consider the ASP.Net MVC to be a default choice if all you have is that or WebForms.&lt;/p&gt;
&lt;p&gt;The pros of using an MVC framework are well known by now, so I wouldn't go blathering about that. ASP.Net MVC certainly hits a lot of those points. Another benefit that wasn't obvious to me was the default view engine, which uses the same WebForms editor. This means that we get intellisense. That was surprisingly nice to have.&lt;/p&gt;
&lt;p&gt;Unfortunately, the WebForms view engine is also useless for any intermediate to advance scenarios, because it only allows you to render directly to the response, and doesn't allow you to capture the output of views and partials and process them further.&lt;/p&gt;
&lt;p&gt;Another problem that I encountered with the framework is that, to someone who has been doing MVC for years, is it extremely non obvious at times. My default mode of learning is to dive into the code, and in general, this has been a successful way of doing things across many projects that I learned. I don't really like it that I run into brick walls along the way with ASP.Net MVC, but I should point out that my thinking about how things &lt;em&gt;should&lt;/em&gt; work is based on my work with MonoRail, and it is likely affecting my expectation about the way the ASP.Net MVC behaves. Even so, there are several design decisions made there that I strongly disagree with.&lt;/p&gt;
&lt;p&gt;The most problematic issue that I run into with the ASP.Net MVC during the last too weeks, and &lt;em&gt;the&lt;/em&gt; reason that I don't consider the ASP.Net MVC vs. MonoRail to be a coin toss, is that a lot of the code is &lt;strong&gt;internal&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Now, I didn't actually went over the ASP.Net MVC source code. But I did tried to do things with it and was blocked several times because some of the things that I wanted to do are internal (IBuildManager comes to mind as a repeated example). The obsession with internal, and the resulting limitations of what I can do with the framework, is a huge problem for me in just about any Microsoft product. In this project, I explicitly didn't set out to create any complex site. I built a very trivial data driven CMS. Nevertheless, I hit a lot of those internal API, grr!&lt;/p&gt;
&lt;p&gt;Most of those occur when trying to do anything interesting with the web forms view engine. There is enough friction using that that is it worth dropping it (web forms view engine) all together, even with the bonus of having intellisense in the views.&lt;/p&gt;
&lt;p&gt;From the point of view of actual framework, I found it pleasant to work with for most of the time. And the extensions points that are open are very useful (OnActionExecuting, OnActionExecuted are good example of that). I think that in order to really get the benefits of the framework, I am going to have follow Jeremy Miller's footsteps and rip out all the thinks that I don't care about and replace them with a heavily opinionated and customized version.&lt;/p&gt;
&lt;p&gt;The good news is that it is possible, and without too much problem.&lt;/p&gt;
&lt;img src="http://ayende.com/Blog/aggbug/10603.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/11/12/on-asp.net-mvc-yes-again.aspx</guid>
            <pubDate>Wed, 12 Nov 2008 19:40:31 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10603.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/11/12/on-asp.net-mvc-yes-again.aspx#feedback</comments>
            <slash:comments>16</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10603.aspx</wfw:commentRss>
        </item>
        <item>
            <title>And yet ANOTHER ASP.Net MVC Bug</title>
            <link>http://ayende.com/Blog/archive/2008/11/11/and-yet-another-asp.net-mvc-bug.aspx</link>
            <description>&lt;p&gt;This is getting annoying, to tell you the truth. I am trying to develop an application here, not do QA.&lt;/p&gt; &lt;p&gt;Let us take the following class:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; IdAndName
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;long&lt;/span&gt; Id { &lt;span style="color: #0000ff"&gt;get&lt;/span&gt;; &lt;span style="color: #0000ff"&gt;set&lt;/span&gt;; }
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Name { &lt;span style="color: #0000ff"&gt;get&lt;/span&gt;; &lt;span style="color: #0000ff"&gt;set&lt;/span&gt;; }
}&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;And the following code:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;var idAndNames = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;[]
{
    &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; IdAndName {Id = 1, Name = "&lt;span style="color: #8b0000"&gt;one&lt;/span&gt;"},
    &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; IdAndName {Id = 2, Name = "&lt;span style="color: #8b0000"&gt;two&lt;/span&gt;"}
};
var list2 = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SelectList(idAndNames, "&lt;span style="color: #8b0000"&gt;Id&lt;/span&gt;", "&lt;span style="color: #8b0000"&gt;Name&lt;/span&gt;", idAndNames[1]);
var result2 = Html.DropDownList("&lt;span style="color: #8b0000"&gt;test&lt;/span&gt;",list2);
	&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;What would you expect the value of result2 to be? I would expect it to render a &amp;lt;select&amp;gt; with two items, the second of which should be selected. Here it what it &lt;em&gt;is&lt;/em&gt; generating:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;select&lt;/span&gt; &lt;span style="color: #ff0000"&gt;id&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;"test"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;"test"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;option&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;"1"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;one&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;option&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
	&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;option&lt;/span&gt; &lt;span style="color: #ff0000"&gt;value&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;"2"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;two&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;option&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;select&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Notice that &lt;em&gt;there is no selected&lt;/em&gt; attribute on the second one.&lt;/p&gt;
&lt;p&gt;I will suffice with GRRRRRRRRRR!!!!! at this point.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/10599.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/11/11/and-yet-another-asp.net-mvc-bug.aspx</guid>
            <pubDate>Tue, 11 Nov 2008 20:31:44 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10599.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/11/11/and-yet-another-asp.net-mvc-bug.aspx#feedback</comments>
            <slash:comments>36</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10599.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Another ASP.Net MVC bug: Rendering views to different output source</title>
            <link>http://ayende.com/Blog/archive/2008/11/11/another-asp.net-mvc-bug-rendering-views-to-different-output-source.aspx</link>
            <description>&lt;p&gt;Take a look at the following code. What would you expect the result of this code to be?&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Ano.NetMVCbugRenderingviewstodifferentou_13C4E/image_2.png"&gt;&lt;img height="166" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Ano.NetMVCbugRenderingviewstodifferentou_13C4E/image_thumb.png" width="860" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Leaving aside the question of exactly what I am doing here, or why. What I thought this &lt;em&gt;should&lt;/em&gt; do was to render the partial view into the string writer.&lt;/p&gt; &lt;p&gt;The method signature of Render most strongly suggest that this is what it would do. What it actually &lt;em&gt;does &lt;/em&gt;is to render the partial view directly into the response. Following the code a bit more, it looks like you literally cannot do this.&lt;/p&gt; &lt;p&gt;ASP.Net MVC views are hard coded to use the current request ( ViewPage.RenderView ). I checked a bit, and without basically faking the entire HttpContext and all its associated objects, that doesn't seem to be happening.&lt;/p&gt; &lt;p&gt;There are two problems here:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;The API lies about what it is doing&lt;/li&gt; &lt;li&gt;There is no simple &amp;amp; obvious way to get the output of a view except directly into the response.&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://ayende.com/Blog/aggbug/10598.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/11/11/another-asp.net-mvc-bug-rendering-views-to-different-output-source.aspx</guid>
            <pubDate>Tue, 11 Nov 2008 20:29:41 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10598.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/11/11/another-asp.net-mvc-bug-rendering-views-to-different-output-source.aspx#feedback</comments>
            <slash:comments>12</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10598.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Reproducing a bug</title>
            <link>http://ayende.com/Blog/archive/2008/11/07/reproducing-a-bug.aspx</link>
            <description>&lt;p /&gt; &lt;p&gt;Create new ASP.Net MVC application:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Reproducingabug_1033F/image_2.png"&gt;&lt;img height="345" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Reproducingabug_1033F/image_thumb.png" width="478" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Create an action that take non nullable argument called 'id':&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;[HandleError]
&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; HomeController : Controller
{
    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ActionResult Index()
    {
        ViewData["&lt;span style="color: #8b0000"&gt;Title&lt;/span&gt;"] = "&lt;span style="color: #8b0000"&gt;Home Page&lt;/span&gt;";
        ViewData["&lt;span style="color: #8b0000"&gt;Message&lt;/span&gt;"] = "&lt;span style="color: #8b0000"&gt;Welcome to ASP.NET MVC!&lt;/span&gt;";

        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; View();
    }

    &lt;strong&gt;&lt;font size="5"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ActionResult Test(&lt;span style="color: #0000ff"&gt;int&lt;/span&gt; id)
    {
        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Content(id.ToString());
    }&lt;/font&gt;&lt;/strong&gt;

    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ActionResult About()
    {
        ViewData["&lt;span style="color: #8b0000"&gt;Title&lt;/span&gt;"] = "&lt;span style="color: #8b0000"&gt;About Page&lt;/span&gt;";

        &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; View();
    }
}&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Go to home/index.aspx and add the following before the final &amp;lt;/asp:Content&amp;gt; tag:&lt;/p&gt;
&lt;blockquote&gt;&lt;pre&gt;    &amp;lt;% &lt;span style="color: #0000ff"&gt;using&lt;/span&gt;(Html.BeginForm("&lt;span style="color: #8b0000"&gt;Test&lt;/span&gt;","&lt;span style="color: #8b0000"&gt;Home&lt;/span&gt;")){ %&amp;gt;
        &amp;lt;%=Html.Hidden("&lt;span style="color: #8b0000"&gt;id&lt;/span&gt;",2) %&amp;gt;
        &amp;lt;input type="&lt;span style="color: #8b0000"&gt;submit&lt;/span&gt;" &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;="&lt;span style="color: #8b0000"&gt;test&lt;/span&gt;" /&amp;gt;
    &amp;lt;%} %&amp;gt;&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;Visit the site and see that you indeed have a test button on the page. Click the button.&lt;/p&gt;
&lt;p&gt;Get an exception:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Reproducingabug_1033F/image_4.png"&gt;&lt;img height="345" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/Reproducingabug_1033F/image_thumb_1.png" width="754" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am going to assume this is a bug.&lt;/p&gt;
&lt;p&gt;This is on the ASP.Net MVC beta bits. &lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/10594.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/11/07/reproducing-a-bug.aspx</guid>
            <pubDate>Fri, 07 Nov 2008 16:29:46 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10594.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/11/07/reproducing-a-bug.aspx#feedback</comments>
            <slash:comments>13</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10594.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Title left blank since I can't think of non inflammatory title for this post</title>
            <link>http://ayende.com/Blog/archive/2008/11/07/title-left-blank-since-i-cant-think-of-non-inflammatory.aspx</link>
            <description>&lt;p&gt;This works:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/TitleleftblanksinceIcantthinkofnoninflam_F761/image_2.png"&gt;&lt;img height="81" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/TitleleftblanksinceIcantthinkofnoninflam_F761/image_thumb.png" width="566" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;This doesn't:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/TitleleftblanksinceIcantthinkofnoninflam_F761/image_4.png"&gt;&lt;img height="52" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/TitleleftblanksinceIcantthinkofnoninflam_F761/image_thumb_1.png" width="556" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I haven't bothered to find why, but that is surprising to me. (Note that here the enctype is specified as "multipart/form-data", which may or may not be related)&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; It is not related. &lt;/p&gt; &lt;p&gt;The real culprit, as best I was able to reconstruct is because of this piece of code:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("&lt;span style="color: #8b0000"&gt;{resource}.axd/{*pathInfo}&lt;/span&gt;");

    routes.MapRoute(
        "&lt;span style="color: #8b0000"&gt;Default&lt;/span&gt;", 
        "&lt;span style="color: #8b0000"&gt;{controller}/{action}/{id}&lt;/span&gt;", 
        &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; {controller = "&lt;span style="color: #8b0000"&gt;Home&lt;/span&gt;", action = "&lt;span style="color: #8b0000"&gt;Index&lt;/span&gt;", id = String.Empty} 
        );
}
&lt;/pre&gt;&lt;/blockquote&gt;
&lt;p&gt;It looks fairly innocuous, doesn't it?&lt;/p&gt;
&lt;p&gt;Except that this means that when ASP.Net MVC looks for a matching value for the "id" parameter, it will &lt;em&gt;only&lt;/em&gt; look in the route parameters, and not look at the request parameters.&lt;/p&gt;
&lt;p&gt;I found this surprising, to say the least.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/10593.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/11/07/title-left-blank-since-i-cant-think-of-non-inflammatory.aspx</guid>
            <pubDate>Fri, 07 Nov 2008 15:35:36 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10593.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/11/07/title-left-blank-since-i-cant-think-of-non-inflammatory.aspx#feedback</comments>
            <slash:comments>12</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10593.aspx</wfw:commentRss>
        </item>
        <item>
            <title>A case study of bad API design: ASP.Net MVC Routing</title>
            <link>http://ayende.com/Blog/archive/2008/11/05/a-case-study-of-bad-api-design-asp.net-mvc-routing.aspx</link>
            <description>&lt;p /&gt; &lt;p&gt;I am doing a spike in ASP.Net MVC now (and I'll talk about this at length at another time). I hit the wall when I wanted to do something that is trivially simple in MonoRail, limit a routing parameter to be a valid integer.&lt;/p&gt; &lt;p&gt;Luckily, just looking at the API signature told me that this is a supported scenario:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/AcasestudyofbadAPIdesignAS.NetMVCRouting_C865/image_2.png"&gt;&lt;img height="207" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/AcasestudyofbadAPIdesignAS.NetMVCRouting_C865/image_thumb.png" width="860" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Unfortunately, that is &lt;em&gt;all&lt;/em&gt; that it told me. This method accept an object. And there is no hint of documentation to explain what I am suppose to do with it. A bit of thinking suggested that I am probably supposed to pass an anonymous type with the key as the route parameter and the value is some sort of a constraint. But &lt;em&gt;what sort&lt;/em&gt; of a constraint. &lt;/p&gt; &lt;p&gt; Type information is one of those things that static language actually do, and from experience in both dynamic and static languages, while it is often a PITA to specify types, it actually help for people who read the code. Not often, I'll admit, but it is helpful for the uninitiated.&lt;/p&gt; &lt;p&gt;I am... unused to having this type of problem in C#. &lt;/p&gt; &lt;p&gt;So I did what any developer would do, hit google and tried to find some information about it. Didn't work.&lt;/p&gt; &lt;p&gt;I pulled reflector and started to track down what is going on there. Following a maze of untyped paths that I have not seen the like since the 1.1 days, I finally figured out that the value that I need to push is an instance of IRouteConstraint.&lt;/p&gt; &lt;p&gt;Obvious, isn't it?&lt;/p&gt; &lt;p&gt;In short, and the reason of this post. I am seeing a lot of parameter signatures that look like that, and have barely defined semantics. I would file this under C#.Abuse();&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/10584.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/11/05/a-case-study-of-bad-api-design-asp.net-mvc-routing.aspx</guid>
            <pubDate>Wed, 05 Nov 2008 19:16:08 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10584.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/11/05/a-case-study-of-bad-api-design-asp.net-mvc-routing.aspx#feedback</comments>
            <slash:comments>23</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10584.aspx</wfw:commentRss>
        </item>
        <item>
            <title>PhizzPop fizzed out</title>
            <link>http://ayende.com/Blog/archive/2008/11/05/phizzpop-fizzed-out.aspx</link>
            <description>&lt;p&gt;Yesterday I was at the &lt;a href="http://phizzpop.com/main/Home.aspx"&gt;PhizzPop&lt;/a&gt; design party in New York. The purpose of the party was to show off the capabilities of the new Expression 2.0 product line. The way chosen to do so was by getting several companies to participate in a content to get the best result. It might have been a good idea, but it back fired tremendously.&lt;/p&gt;
&lt;p&gt;One of the reasons that I went to that party was the expectation that I would be impressed by the new capabilities. Instead, what I saw there was... disappointing.&lt;/p&gt;
&lt;p&gt;The best candidate application there was adequate. In fact, it was pretty good, but not nearly good enough to take part in a design contest. It is bad when I, a developer with negative UI sense, can spot problematic UI and see how they had to fight with the platform to get it to do things.&lt;/p&gt;
&lt;p&gt;And that was the &lt;em&gt;best&lt;/em&gt; they had. One of the other application (in a design contest!) had a RadioButton1, RadioButton2 and other things like that showing. They could literally not be bothered to change something as basic as that.&lt;/p&gt;
&lt;p&gt;I was very disappointed, and the impression that I got from the entries in the contest is that the platform is a really lousy one. Especially considering the amount of time that was supposedly invested on the entries.&lt;/p&gt;
&lt;p&gt;To conclude, I want to quote myself: "I know of people who can do better and faster than that drunk, and while writing the XAML on a stone tablet with a chisel."&lt;/p&gt;
&lt;p&gt;Very disappointing.&lt;/p&gt;
&lt;img src="http://ayende.com/Blog/aggbug/10582.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/11/05/phizzpop-fizzed-out.aspx</guid>
            <pubDate>Wed, 05 Nov 2008 14:11:41 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10582.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/11/05/phizzpop-fizzed-out.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10582.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Visual Studio 2010</title>
            <link>http://ayende.com/Blog/archive/2008/10/27/visual-studio-2010.aspx</link>
            <description>&lt;p&gt;I got the chance to get an early CTP of Visual Studio 2010.  &lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_4.png"&gt;&lt;img height="32" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_thumb_1.png" width="194" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;This is the post I use to record my first impressions. There is no order to this post, it is just impressions jotted down as I see them.&lt;/p&gt; &lt;p&gt;We seem to have a new start page:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_6.png"&gt;&lt;img height="286" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_thumb_2.png" width="384" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Following the MS &amp;amp; OSS new approach, one of the samples is Dinner Now using Lucene, which is the first project that I found to test.&lt;/p&gt; &lt;p&gt;TFS is still broken:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_8.png"&gt;&lt;img height="129" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_thumb_3.png" width="503" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;I &lt;em&gt;really &lt;/em&gt;don't like to see this kind of issues in a source control system. It means that it cannot be trusted.&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_10.png"&gt;&lt;img height="332" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_thumb_4.png" width="520" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;Looks like we have something new here. On first impression, it looks like we have UML integrated into VS.&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_12.png"&gt;&lt;img height="347" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_thumb_5.png" width="726" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt; &lt;/p&gt; &lt;p&gt;I took a look at the generated XML, which is the backing store for the diagrams, and it looks like it should work with source control much better than the usual modeling stuff in visual studio.&lt;/p&gt; &lt;p&gt;Another feature that is &lt;em&gt;very&lt;/em&gt; welcome for anyone doing presentations is the use of CTRL+Scroll Wheel for zooming.&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_14.png"&gt;&lt;img height="190" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_thumb_6.png" width="726" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;We are also promised performance improvements for large files, which is nice. Part of the walkthroughs talk about integrating functionality using MEF, which is good.&lt;/p&gt; &lt;p&gt;Looking at the walkthrough for creating syntax highlighting, tagging and intellisense, it looks like a lot of ceremony still, but it seems significantly easier than before.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;WPF - &lt;/strong&gt;It looks like VS is moving to WPF, although this CTP is still midway.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;C# has dynamic variables!&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;dynamic doc = HtmlPage.Document.AsDynamic();  &lt;/p&gt;&lt;p&gt;dynamic win = HtmlPage.Window.AsDynamic();&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This was talked about in the MVP Summit, a dynamic object is an object that implements IDynamicObject:  &lt;/p&gt;&lt;blockquote&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_16.png"&gt;&lt;img height="126" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_thumb_7.png" width="440" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Note that we accept an expression parameter (using Linq expressions) and we return a meta object. Show below.&lt;/p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_18.png"&gt;&lt;img height="439" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_thumb_8.png" width="618" border="0" /&gt;&lt;/a&gt;  &lt;p&gt;This looks like C# + DLR integration, which is cool. I am looking forward to see what we can do with it.&lt;/p&gt; &lt;p&gt;VS also get some R# like features:&lt;/p&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_20.png"&gt;&lt;img height="146" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/VisualStudio2010_E637/image_thumb_9.png" width="619" border="0" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;p&gt;There is also a quick search, apparently, but I am not really impressed. Again, show me something that I &lt;em&gt;don't&lt;/em&gt; have.&lt;/p&gt; &lt;p&gt;There &lt;em&gt;is &lt;/em&gt;CLR 4.0, so we somehow skipped CLR 3.0. I am glad to know that we have a new runtime version, instead of just patching the 2.0 very slowly.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Threading&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;System.Threading.Tasks is new, and looks to be very interesting. It also seem to have integration with Visual Studio. It is also interesting because we seem to have a lot more control over that than we traditionally had in the ThreadPoll.&lt;/p&gt; &lt;p&gt;Parallel extensions are also in as part of the framework, not that this would be a big surprise to anyone.&lt;/p&gt; &lt;p&gt;In the CTP that I have, there is nothing about Oslo, models or DSL, which I found disappointing. I guess I'll have to wait a bit more to figure out what is going on.&lt;/p&gt; &lt;p&gt;That was a quick review, and I must admit that I haven't dug deep, but the most important IDE feature, from my perspective, is the CTRL+Scroll wheel zooming. The diagrams support is nice, but I am not sure that I like it in my IDE. Threading enhancements are going to be cool, and I am looking forward to seeing what kind of dynamic meta programming we can do with it.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/10566.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/10/27/visual-studio-2010.aspx</guid>
            <pubDate>Mon, 27 Oct 2008 10:48:14 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10566.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/10/27/visual-studio-2010.aspx#feedback</comments>
            <slash:comments>18</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10566.aspx</wfw:commentRss>
        </item>
        <item>
            <title>On jQuery &amp;amp; Microsoft</title>
            <link>http://ayende.com/Blog/archive/2008/09/29/on-jquery-amp-microsoft.aspx</link>
            <description>&lt;p&gt;No, I am not going to bore you with another repetition of the news. Yeah, Microsoft is going to bundle jQuery with Visual Studio and the ASP.Net MVC. That is important, but not quite as important as something else that I didn't see other people pointing out.&lt;/p&gt; &lt;p&gt;This is the first time in a long time that I have seen Microsoft incorporating an &lt;a href="http://docs.jquery.com/License"&gt;Open Source&lt;/a&gt; project into their product line. &lt;/p&gt; &lt;p&gt;I am both thrilled and shocked.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/10527.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/09/29/on-jquery-amp-microsoft.aspx</guid>
            <pubDate>Mon, 29 Sep 2008 06:44:27 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10527.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/09/29/on-jquery-amp-microsoft.aspx#feedback</comments>
            <slash:comments>16</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10527.aspx</wfw:commentRss>
        </item>
        <item>
            <title>The Managed Extensibility Framework</title>
            <link>http://ayende.com/Blog/archive/2008/09/25/the-managed-extensibility-framework.aspx</link>
            <description>&lt;p&gt;The &lt;a href="http://www.codeplex.com/MEF"&gt;Managed Extensibility Framework&lt;/a&gt; is "new library in .NET that enables greater reuse of applications and components. Using MEF, .NET applications can make the shift from being statically compiled to dynamically composed. If you are building extensible applications, extensible frameworks and application extensions, then MEF is for you."&lt;/p&gt; &lt;p&gt;(I was too lazy to think about my own description for it, so I just copied the official one.)&lt;/p&gt; &lt;p&gt;Probably the first thing that you should know about MEF is what will undoubtedly be the most common cause for confusion.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;The Managed Extensibility Framework is &lt;strong&gt;not&lt;/strong&gt; an IoC container.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;a href="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/TheManagedExtensibilityFramework_11B97/image_4.png"&gt;&lt;img height="195" alt="image" src="http://ayende.com/Blog/images/ayende_com/Blog/WindowsLiveWriter/TheManagedExtensibilityFramework_11B97/image_thumb_1.png" width="248" align="right" border="0" /&gt;&lt;/a&gt; This is not a slug at MEF, it is an important distinction. If you try to judge MEF through IoC container glasses, you will come away confused. It may walk like a duck, but it meows.&lt;/p&gt; &lt;p&gt;MEF is, first and foremost, a composition framework. And its target audience are &lt;strong&gt;&lt;em&gt;BIG&lt;/em&gt;&lt;/strong&gt; applications. Those two, taken together, are important to understand what MEF is and how we should look at it.&lt;/p&gt; &lt;p&gt;What is the difference between a composition framework and an IoC container? On the surface, they are doing much of the same thing, managing dependencies for the application in an automated fashion. The difference (and the devil) are in the details.&lt;/p&gt; &lt;p&gt;IoC containers have long ago stopped just managing dependencies. They are taking care of a lot of additional responsibilities. Managing lifecycles, proxies, aspect orientation, event aggregation, transaction semantics and a lot of other features.&lt;/p&gt; &lt;p&gt;In addition to that, there is a lot of focus on problem solving by utilizing the container. Things like generic specialization or component selectors allows you to approach a lot of very complex problems in a completely different mindset.&lt;/p&gt; &lt;p&gt;A composition framework, on the other hand, is focused on a single goal: dependency management. &lt;/p&gt; &lt;p&gt;It sounds like MEF is a subset of what an IoC container is doing, I know. This is not the case. MEF, the bits we have &lt;em&gt;right now, &lt;/em&gt;are doing a lot more in the area of dependency management than the containers are doing. Where a container is usually static and opaque, MEF primary focus is to make the dependency management itself a dynamic and transparent process.&lt;/p&gt; &lt;p&gt;This is where the second part of the MEF design goals come into place. MEF is targeting Big applications. The &lt;em&gt;really&lt;/em&gt; big ones. One of the immediate customers of MEF is Visual Studio itself. &lt;/p&gt; &lt;p&gt;Things like ( take a deep breath ):&lt;/p&gt; &lt;ul&gt; &lt;li&gt;being able to query meta data without loading assemblies&lt;/li&gt; &lt;li&gt;statically verify the dependency graph for all the components and reject those that would put the system in in valid state&lt;/li&gt; &lt;li&gt;being explicit by default&lt;/li&gt; &lt;li&gt;contract adapters&lt;/li&gt; &lt;li&gt;discovery &lt;/li&gt; &lt;li&gt;metadata tagging &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;All of those are key concepts in the overall dependency management theme. And all of those are the product of having a Visual Studio being one of the first consumers of this project. Visual Studio &lt;em&gt;needs&lt;/em&gt; this kind of things, across tens of thousands of components. And MEF is setup to handle those kind of scenarios.&lt;/p&gt; &lt;p&gt;So, MEF is very similar to IoC containers, but it has very different goals (or maybe it would be more accurate to say that it has very different priorities). &lt;/p&gt; &lt;p&gt;Another important aspect of MEF has nothing to do with it at all and everything to do with where it is going to be used. MEF is going to ship with .Net 4.0, which put it in a position to be very widely distributed, but more importantly, since it is on the framework, it can be used by other parts of the framework. Which is where it get interesting. &lt;/p&gt; &lt;p&gt;There are a lot of places in the framework that could make use of a container. IControllerFactory is a good example of something that should not exists, for example. I am ambivalent with regards to that, because I think that the correct abstraction for those kind of things is not necessarily MEF, but that is beside the point.&lt;/p&gt; &lt;p&gt;And that is enough for now, I am going to toss a coin and see if it is going to be Erlang code or meta documentation next.&lt;/p&gt;&lt;img src="http://ayende.com/Blog/aggbug/10522.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Ayende Rahien</dc:creator>
            <guid>http://ayende.com/Blog/archive/2008/09/25/the-managed-extensibility-framework.aspx</guid>
            <pubDate>Thu, 25 Sep 2008 17:10:22 GMT</pubDate>
            <wfw:comment>http://ayende.com/Blog/comments/10522.aspx</wfw:comment>
            <comments>http://ayende.com/Blog/archive/2008/09/25/the-managed-extensibility-framework.aspx#feedback</comments>
            <slash:comments>9</slash:comments>
            <wfw:commentRss>http://ayende.com/Blog/comments/commentRss/10522.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>