Thoughts on ASP.NET MVC Preview 2 and Beyond, code, mvc 0 comments suggest edit

At this year’s Mix conference, we announced the availability of the second preview for ASP.NET MVC which you can download from here. Videos highlighting MVC are also available.

Now that I am back from Mix and have time to breathe, I thought I’d share a few (non-exhaustive) highlights of this release as well as my thoughts on the future.

New Assemblies and Routing

Much of the effort and focus of this release was put into routing. If you’ve installed the release, you’ll notice that MVC has been factored into three assemblies:

  • System.Web.Mvc
  • System.Web.Routing
  • System.Web.Abstractions

The key takeaway here is that MVC depends on Routing which depends on Abstractions.

MVC => Routing => Abstractions

Routing is being used by another team here at Microsoft so we worked on making it an independent feature to MVC. MVC relies heavily on routing, but routing doesn’t have any knowledge of MVC. I’ll write a follow up post that talks about the implications of that and how you might use Routing in a non-MVC context.

Because of the other dependencies on Routing, we spent a lot of time trying to make sure we got the API and code correct and making sure the quality level of routing meets an extremely high bar. Unfortunately, this investment in routing did mean that we didn’t implement everything we wanted to implement for MVC core, but hey, it’s a preview right? ;)

CodePlex Builds

At Mix this year Scott Hanselman’s gave a great talk (IMHO) on MVC. One thing he announced during that talk is the vehicle by which we will be making the MVC source code available. Many of you might recall ScottGu’s recent roadmap for MVC in which he mentioned we would be making the source available. At Mix, Scottha announced that we would be deploying our source to CodePlex soon.

Not only that, we hope to push source from our source control to a CodePlex Project’s source control server on a semi-regular basis. These builds would only include source (in a buildable form) and would not include the usual hoopla with associated with a full Preview or Beta release.

How regular a schedule we keep to remains to be seen, but Scott mentioned in his talk around every four to six weeks. Secretly, between you and me, I’d love to push even more regularly. Just keep in mind that this is an experiment in transparency here at Microsoft, so we’ll start slow (baby steps!) and see how it progresses. In spirit, this would be the equivalent to the daily builds that are common in open source projects, just not daily.

Unit Test Framework Integration

In a recent post, I highlighted some of the work we’re doing around integrating third party unit testing frameworks.

Unit Testing

I’ve been in contact with various unit testing framework developers about integrating their frameworks with the MVC project template. I’m happy to see that MbUnit released updated installers that will integrate MbUnit into this dropdown. Hopefully the others will follow suit soon.

One interesting approach I should point out is that this is a great way to integrate your own totally tricked out unit testing project template complete with your favorite mock framework and your own private assembly full of your useful unit test helper classes and methods.

If you’re interested in building your own customized test framework project which will show up in this dropdown, Joe Cartano of the Web Tools team posted an updated streamlined walkthrough on how to do so using NUnit and Rhino Mocks as an example.

Upcoming improvements

One area in this preview we need to improve is the testability of the framework. The entire MVC dev team had a pause in which we performed some app building and uncovered some of the same problems being reported in various forums. Problems such as testing controller actions in which a call to RedirectToAction is made. Other problems include the fact that you need to mock ControllerContext even if you’re not using it within the action. There are many others that have been reported by various people in the community and we are listening. We ourselves have encountered many of them and definitely want to address them.

Experiencing the pain ourselves is very important to understanding how we should fix these issues. One valuable lesson I learned is that a framework that is testable does not mean that applications built with that framework are testable. We definitely have to keep that in mind as we move forward.

To that end, we’ll be applying some suggested improvements in upcoming releases that address these problems. One particular refactoring I’m excited about is ways to make the controller class itself more lightweight. Some of us are still recovering from Mix so as we move forward, I hope to provide even more details on specifically what we hope to do rather than this hand-waving approach. Bear with me.

During this next phase, I personally hope to have more time to continuously do app building to make sure these sort of testing problems don’t crop up again. For the ones that are out there, I take responsibility and apologize. I am a big a fan of TDD as anyone and I hate making life difficult for my brethren. ;)


When do we RTM? This is probably the most asked question I get and right now, I don’t have a good answer. In part, because I’m still trying to sort through massive amounts of feedback regarding this question. Some questions I’ve been asking various people revolve around the very notion of RTM for a project like this :

  • How important is RTM to you?
  • Right now, the license allows you to go-live and we’ll provide the source, is that good enough for your needs?
  • Is it really RTM that you want, or is it the assurance that the framework won’t churn so much?
  • What if we told you what areas are stable and which areas will undergo churn, would you still need the RTM label?
  • Is there a question I should be asking regarding this that I’m not? ;)

I do hope to have a more concrete answer soon based on this feedback. In general, what I have been hearing from people thus far is they would like to see an RTM release sooner rather than later, even if it is not feature rich. I look forward to hearing from more people on this.

Closing Thoughts

In general, we have received an enormous amount of interest and feedback in this project. Please do keep it coming as the constructive feedback is really shaping the project. Tell us what you like as well as what is causing you problems. We might not respond to every single thing reported as quickly as we would like to, but we are involved in the forums and I am still trying to working through the massive list of emails accrued during Mix.

Technorati Tags: ASP.NET,aspnetmvc,software

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.



39 responses

  1. Avatar for VIjay Santhanam
    VIjay Santhanam March 10th, 2008

    how will you fix the RedirectToAction issue? just by making it public?
    I like the new assembly structure. Glad you guys realised routing was really valuable.
    Why not codeplex the project so it goes faster and has more contributions?

  2. Avatar for Richard Banks
    Richard Banks March 10th, 2008

    Re the RTM question. As a developer it's about the code churn for me.
    However from a pitch viewpoint having the v1.0 RTM label helps in convincing our more "risk-averse" customers that the MVC is a stable and supported technology and that using it in a project is OK.

  3. Avatar for Luiz Oliveira
    Luiz Oliveira March 10th, 2008

    About RTM question: One important think about RTM it's a guarantee that we don't have great changes in the future releases that make our actual implementation using the framework brake when a new release is availability.
    One question, are the MVC team thinking about change de reouter to make possible to use MVC Framework in a shared host without necessary to use .mvc in my controller name inside URL?
    Thanks, and congratulations, the Asp.NET MVC is great!
    Sorry by english, I'm learning.

  4. Avatar for Kevin Dente
    Kevin Dente March 10th, 2008

    Kudos to the ASP.NET MVC team - you guys are breaking new ground at Microsoft in how software is developed and delivered.

  5. Avatar for Mitch
    Mitch March 10th, 2008

    Incremental builds, no RTM, but rather regular builds. Wow! Microsoft is finally writing code the way the rest of us write code.
    Great Job!!!

  6. Avatar for Dave "The Ninja" Law
    Dave "The Ninja" Law March 10th, 2008

    Mr Haaaaaaaaaaack
    Very impressed so far with MVC.NET and already am implimenting the framework in 3 new projects - and Loving it!
    However, I have been trying to find some features spoken about on "The Gu's" blog, particularly:
    [OutputCache(Duration="")] attribute and
    [Authorisation(ALlowRole="")] attribute - Point 5
    I have rolled my own SecurityFilter Attibute for the moment but if you could shed any light on the above it would be a great help!!

    The Ninja
    Glasgow, Scotland, UK

  7. Avatar for Dragan Panjkov
    Dragan Panjkov March 10th, 2008

    can you post code for mvc hands on labs from mix? I wasn't been on mix in vegas, but would like to work through those HOLs

  8. Avatar for Andrew Davey
    Andrew Davey March 10th, 2008

    Are you inventing something different from the UriTemplate and UriTemplateTable classes already found in .NET 3.5?
    I have been using those classes in WCF and separately in my own web framework with great success. Has someone checked you are not re-inventing the wheel?

  9. Avatar for Andy
    Andy March 10th, 2008

    Re the RTM question. Where is the link to the latest license? The last one mentioned no ecommerce sites or something along those lines. In general, as the MVC pattern is pretty tried and tested I am hoping that an RTM can be soon (early Q3 would be amazing). I'd even perhaps like to see the Routing, Controllers, Filters and Views released. And HtmlHelpers could even again be part of Extensions/Toolkit - though I certainly like their current strongly typed format, with Lambdas. Because there could be calls for the HtmlHelpers to be refactored or the markup tweeked for some time.

  10. Avatar for Simone Chiaretta
    Simone Chiaretta March 10th, 2008

    Hi Phil,
    in the last days I played around a bit with MVC P2 and I'm glad you are already addressing the issues around the RedirectToAction and ControllerContext:
    I wrote my small testing method here:
    Talking about RTM... personally I'd not care about it that much, as long as at some point the framework has a clear and well-defined architecture so that it is declared as "released" in the sense that you take all the precautions typical of a new release when moving to the next code drop: make things deprecated before dropping them, keep breaking changes to the minimum, not changing the overall architecture, and so on
    At the moment you can't say we are at this stage since a lot of thing need to be cleaned up.
    And more again, speaking about my personal desiderata, I'd like to see a System.Mvc.Testing.dll that contains some pre-baked specific testing helpers like a TestViewEngine.
    Keep up the good work.
    PS: will you ever have time to chat about next Subtext release? ;-)

  11. Avatar for Mike
    Mike March 10th, 2008

    Good job on the Codeplex deal, I appreciate that very much and I look forward to reading and learning from your code!

  12. Avatar for Tortilla Curtain
    Tortilla Curtain March 10th, 2008

    I echo some of the sentiments already stated: an RTM designation is good because it represents a sense that something is complete and trustworthy. Software with an RTM designation is much more convincing to management than something that is partly RTM'ed and partly churning. So, for me, it is about the churn and the trust. I need to feel that YOU think it's ready, and then I'll take my shot at it.

  13. Avatar for Some Corporate Slave
    Some Corporate Slave March 10th, 2008

    "How important is RTM to you?"
    Its not that its important to me so much as the dilbertian decision-makers that give us a thumbs up or thumbs down on adapting new technologies. These guys would melt down if they tried to attain the level of independent thought required to answer the rest of the questions in the list.

  14. Avatar for Miguel de Icaza
    Miguel de Icaza March 10th, 2008

    Speaking for the Mono purposes, we would like to know how stable is each component of MVC, so we can start our own implementation based on that.
    We rather not invest time on pieces that will be heavily rewritten or refactored. from your blog post it seems that Abstractions and Routing are probably the safest places to start with (as in: chances are that since another group is using it, those are likely more mature).

  15. Avatar for Swapna Gupta
    Swapna Gupta March 11th, 2008

    I understand your point of view (as you explained in MIX) that it is a lot of effort that goes into releasing an RTM. Having the option to look at the source code and make changes to it, if needed, helps. But having an RTM even if it is not feature-rich is useful.... one to convince the management that we don't have a beta product in production and secondly to understand which pieces may go major revamping.
    Ideally it would be nice to have the RTM at the earliest possible ... and then access to source code on Codeplex should be helpful to get an idea about upcoming features/changes. If I think something in there is really worthwhile, I can take the risk and go for that.
    - Swapna

  16. Avatar for Nick Acevse
    Nick Acevse March 11th, 2008

    MVC _almost_ runs on Mono 1.9 without any modification, straight from the MS provided assemblies. I've been having some trouble getting the routing working using XSP2, but it appears that all of the neccessary dependencies have been implemented in Mono.

  17. Avatar for Nick Aceves
    Nick Aceves March 11th, 2008

    I managed to get the current drop of MVC running on Mono.

  18. Avatar for Roberto Gattinoni
    Roberto Gattinoni March 11th, 2008

    A really great job, Phil. Thank you and all the other superb ASP.NET MVC Team. This seems to be a really "new" Microsoft to me: very much appreciated. What about an "Edge" ASP.NET MVC on CodePlex (a la Rails)?

  19. Avatar for marko
    marko March 11th, 2008

    RTM in and of itself isn't important, especially with a good license to go with it, but since there is concern of the framework changes so much, I agree with Mitch in getting more builds out (maybe that are not covered by the go-live license) to give us adopters a better chance to keep updated.
    MVC: It's shiny!

  20. Avatar for Mike D
    Mike D March 11th, 2008

    Here are a couple of questions on MVC design.
    1) Why are you using aspx and ascx controls, you have unneeded usercontrol code running in a new framework?
    2) Since views can display form fields, why not have the view at least responsible for grabbing the post data as directed by the controller?

  21. Avatar for Ken Robertson
    Ken Robertson March 12th, 2008

    For me, the RTM question has a few views:
    1) For development purposes, I'd want to know where the churn/instability is. Having source definitely helps with checking for instability, I could debug into it if I have issues. Knowning where churn will help with knowing what things to avoid heavy investment in for now.
    2) For launching a site using MVC, stability is the biggest factor. If the site is live, want it to work. Churn is a second, since want to know where change will happen for future updates.
    3) For a development on a product, the actual RTM is most important. If I'm working on something I plan on releasing to the general public, and want people other than those who know how to build from source to use it, knowing when the RTM was coming would be most important. It likely wouldn't be on many hosting providers until RTM, or if before then, you can get inconsistencies with versions.

  22. Avatar for David
    David March 12th, 2008

    As a custom web app builder I'd be wanting an RTM.
    I've been torn between ASP.NET MVC and Monorail. I'm desperate to move away from WebForms for my next project for a host of reasons, but as will most projects the timescale available will be tight.
    This means moving to a new framework creates two extra risks: (i) how long it's going to take me to become fluent in the new framework, and (ii) what gaps/bugs/limitations I come across in new framework.
    So the big influencers for me will probably be:
    1) Source code availability (which makes it faster to learn, and means I can fix bugs or gaps in the framework), and
    2) a version 1.0, which to most customers means bugs in the framework are MS's fault rather than may fault.

  23. Avatar for Haacked
    Haacked March 12th, 2008

    @Mike D : In answer to #1, so we can leverage ASP.NET goodness. The view rendering is extensible, so you can plug in NHibernate or NHaml.
    In answer to #2, got some sample code for what you'd like to see? Not implementation but what a user of MVC would write to do this?

  24. Avatar for Robi
    Robi March 13th, 2008

    +1 for publishing hand on labs - if possible

  25. Avatar for Corey
    Corey March 13th, 2008

    RTM ultimately needs to occur, but when it gets there doesn't matter to me. Even the early previews are pretty sweet to work with, so updating code from release to release is worth the headache IMHO.

  26. Avatar for Jeff Rodenburg
    Jeff Rodenburg March 13th, 2008

    Re: the RTM question
    Thought I'd weigh in with what I've found in open-source projects where I'm a committer.
    For the projects I've been involved with, the RTM designation has been important for initial adopters, while the available source worked better for those with familiarity. By "RTM", in our projects the equivalent is an official version.
    The version number has the "signaling" factor: check me out, i'm stable code, i've been given a stamp of approval, just follow the readme file and you should be up and running.
    For our projects, many users on the mailing list ask about which set of revisions will be marked as officially versioned. The reasons they provide are usually around confidence in the codebase, but a lot of it is just creature comfort of dealing with a stake in the ground.
    For us, any version designation is of code that has been available in trunk source for quite a while, so for many of us the decision is more administrative than anything else, and certainly anti-climactic. Just the nature of our projects, where we encourage more iteration by vetting incremental updates to the source code, as opposed to more whole-hog collective evaluation of an official version.
    In relation to the MVC project, it would seem to depend on overall project progress, the timeliness and breadth of incremental updates, and relation of the RTM revisions to the trunk revisions.
    On the notion of churn, increasing the incremental updates to the trunk source cuts down the (real or perceived) churn factor. Communication of what's stable vs. what's likely to change is important, but the code will speak louder than any words. Speeding up the development process (more bites, more meals vs. buffet style) helps a lot in this respect.
    FWIW, hope this helps.

  27. Avatar for David Cornelson
    David Cornelson March 13th, 2008

    I don't think I need the RTM as much as I need a stability factor for each code drop and the various sections of the framework. I'm the architect on a site redesign and the existing code has no structure and it's my belief that the best structure would be an MVC implementation. I could roll my own cheap MVC, which I've done many times, or I could use yours. I'd prefer to use yours because it would have the "MS" label and because it allows me to focus on other areas. I need some level of comfort in using this in a site that will go live in late summer. I don't want a "guarantee"...just some confidence in using it.

  28. Avatar for old ecard guy
    old ecard guy March 16th, 2008

    The concept of RTM is so 90's...
    The most important thing is that we have a latest stable build and a latest development build.
    Most of us then use the stable build, and we can discuss it and patch it as a community as necessary.
    This type of development is the fastest way to work now days, and very familiar as well to anyone using most other web projects.
    I'm excited about MS working toward this more modern style, although the move is a little slow I guess its understandable you don't want to get this transition wrong.

  29. Avatar for Matt Lavallee
    Matt Lavallee March 18th, 2008

    I'm definitely in the camp favoring a signal when we've crossed the churn curve versus a definite RTM. Late, breaking changes should only be in the case of critical flaws and not to refactor for kicks... we know there will be a 2.0 and it's okay that it's more refined... just make sure 0.8 -> 1.0 are as consistent as possible.

  30. Avatar for Giovanni Bassi
    Giovanni Bassi March 18th, 2008

    You got it on the third question. We'd not develop software that would break in an upcoming release. Even if you told me what areas areas are stable, I'd still prefer to work with the finished product.
    Also, I prefer feature rich, even if it means a longer wait for RTM. And you guys are working really fast, so let people deal with their own anxiety... And keep those releases coming to help them calm down. The Codeplex thing helps too.

  31. Avatar for Andrew Cherry
    Andrew Cherry March 18th, 2008

    For me personally it's all about the source code right now. I know that it's obviously a big shift for you guys to do any work as open source, but at the moment - it isn't. Until it is and that starts to work in a visible fashion it's very difficult for me to know how confident I can be in pushing this forward as a viable avenue for development.
    That's not an issue of free software zealotry in this case, it's a pragmatic view for the business. It's not possible for me to gauge what level of effort will be required in building software on a framework that I expect to modify and extend without source. No matter how good the eventual 1.0 is, I can say for sure that it will need to be extended for our uses. So planning around doing so with no visibility is a risk that pushes me down the path of an alternate product or creating an in-house solution (and that would clearly not benefit the community in the latter case, something I would very much like to happen).
    Anyway. I'm looking forward to seeing the source and hopefully some information around the post release environment - will it be developed in an open fashion? Will you be accepting community based improvements and fixes?

  32. Avatar for Henry Cordes
    Henry Cordes March 20th, 2008

    Personally I like to follow the builds, to see them progress and maybe throw in my two cents.
    But as most of the other developers, I have to convince the decision makers (for obvious reasons) which are easier convinced when a new technology has an RTM build.
    This said, I really enjoy this shift in releasing software at MS!

  33. Avatar for Piers
    Piers March 20th, 2008

    Are you considering supporting asynchronous processing within the controllers? Or do we need to roll our own?

  34. Avatar for Rainer
    Rainer March 21st, 2008

    I tried the new MVC release. Looks awesome. But I can't get the new MediaPlayer getting to work with the MVC approach (missing ScriptManager, which needs a form runat server). Because that would be the complete opposite of MVC, I can't see you you guys want to get that running. Are there any plans?
    Thanks, Rainer

  35. Avatar for Peter Andrews
    Peter Andrews April 10th, 2008

    I have a stupid question.
    I have installed MVC CTP preview , the ASPNetExt.exe. But I am not getting the assemlies
    Please reply

  36. Avatar for Haacked
    Haacked April 10th, 2008

    @Peter you sure you downloaded the Preview 2?

  37. Avatar for David White
    David White April 20th, 2008

    RTM could be important for web hosting companies. Presumably there is little required in order to host ASP.NET MVC, but reaching RTM may help such companies realise this is another feature they can understand, host, support and advertise. RTM will also increase demand for such hosting services.

  38. Avatar for Dave R
    Dave R July 13th, 2008

    Is Legacy MVC Preview 2 an oxymoron?

    So I'm doing some work with Kigg a Digg-like clone built on MVC. It was built on MVC Preview 2 and not compatible with Preview 3 (thread here)

    So I looked for a download of the binaries and they are no longer available (link in body of initial post of this thread is broken) so I downloaded the source from Codeplex, compiled it and it works locally, but when I deploy to my server I'm getting a complaint about the assemblies I compiled:

    Could not load file or assembly 'System.Web.Routing' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)

  39. Avatar for haacked
    haacked July 13th, 2008

    Hmmm, I'd suggest talking to the Kigg folks and see if they can update their code to Preview 3.