[{"data":1,"prerenderedAt":474},["ShallowReactive",2],{"blog:2007:observations-on-microsoft-mvc-for-aspnet":3,"blogMore-Development":460,"comments-observations-on-microsoft-mvc-for-aspnet":473},{"id":4,"title":5,"body":6,"category":440,"commentCount":441,"date":442,"description":12,"excerpt":443,"extension":444,"filenames":445,"hidden":446,"image":445,"meta":447,"minutes":448,"navigation":449,"path":450,"seo":451,"showCategory":445,"stem":452,"tags":453,"updated":445,"url":457,"wordCount":458,"__hash__":459},"content\u002Fblog\u002F2007\u002Fobservations-on-microsoft-mvc-for-aspnet.md","Observations on Microsoft MVC for ASP.NET",{"type":7,"value":8,"toc":422},"minimark",[9,13,16,44,52,57,82,86,100,104,128,132,140,144,149,153,173,177,254,258,273,277,300,304,345,349,366,370,392,396,404,408,416],[10,11,12],"p",{},"Anyone who’s tried to develop large complex web sites with ASP.NET has likely run into many problems covering the page and control life cycle, view state and post backs and subsequent maintainability including the difficulty in creating automated unit tests.",[10,14,15],{},"Microsoft, taking a cue from the popularity of Ruby on Rails and subsequent .NET related efforts such as MonoRail, are embracing the model-view-controller (MVC) pattern and developing something more suited to web development than WebForms which aimed to make web development as similar to Windows development as possible (despite the major underlying differences in architecture).",[10,17,18,19,23,24,31,32,37,38,43],{},"The prototype, currently named System.Web.Mvc ",[20,21,22],"s",{},"or Microsoft.Web.Scalene depending on where you look",", is headed by ",[25,26,30],"a",{"href":27,"rel":28},"https:\u002F\u002Fweblogs.asp.net\u002Fscottgu\u002F",[29],"nofollow","Scott Guthrie"," with both ",[25,33,36],{"href":34,"rel":35},"https:\u002F\u002Fhaacked.com",[29],"Phil Haack"," and ",[25,39,42],{"href":40,"rel":41},"https:\u002F\u002Fwww.hanselman.com",[29],"Scott Hanselman"," involved (sounds like a dream project and team to be involved with) and a preview release (“drop”) is due within the coming weeks.",[10,45,46,51],{},[25,47,50],{"href":48,"rel":49},"https:\u002F\u002Fwww.hanselman.com\u002Fblog\u002FScottGuMVCPresentationAndScottHaScreencastFromALTNETConference.aspx",[29],"Guthrie and Hanselman presented Microsoft MVC at the ALT.NET conference"," which revealed some interesting details buried in the video, my rough observations and notes based on the prototype they showed follows:",[53,54,56],"h2",{"id":55},"philosophy","Philosophy",[58,59,60,64,67,70,73,76,79],"ul",{},[61,62,63],"li",{},"Don’t repeat yourself",[61,65,66],{},"Highly extensible & pluggable",[61,68,69],{},"Use generics to achieve strong-typing without code generation",[61,71,72],{},"Good performance, fast enough for large-scale sites",[61,74,75],{},"Separation of concern for maintainability",[61,77,78],{},"Clean URLs in and out",[61,80,81],{},"Clean HTML",[53,83,85],{"id":84},"extensible","Extensible",[58,87,88,91,94,97],{},[61,89,90],{},"Interfaces used extensively",[61,92,93],{},"No sealed classes",[61,95,96],{},"Plug-in points for view engines (e.g. MonoRail’s NVelocity, Brail)",[61,98,99],{},"Support for Inversion of Control (IoC) engines (e.g. Windsor, StructureMap, Spring.NET)",[53,101,103],{"id":102},"compatibility","Compatibility",[58,105,106,109,112,115,122,125],{},[61,107,108],{},"Runs on the .NET 2.0 CLR",[61,110,111],{},"Some helper classes require .NET 3.5 (extension methods)",[61,113,114],{},"Normal Request, Response objects (via interfaces for mocking)",[61,116,117,118],{},"Does not support postback ",[119,120,121],"code",{},"form runat=\"server\"",[61,123,124],{},"Supports MasterPages, DataBinding, CodeBehind",[61,126,127],{},"Existing .aspx’s are blocked using web.config",[53,129,131],{"id":130},"visual-studio","Visual Studio",[58,133,134,137],{},[61,135,136],{},"Solution templates for web project and unit testing",[61,138,139],{},"Full designer & IntelliSense integration",[53,141,143],{"id":142},"flow","Flow",[58,145,146],{},[61,147,148],{},"Route -> ControllerFactory -> Controller -> Action -> ViewEngine -> View",[53,150,152],{"id":151},"routing","Routing",[58,154,155,158,167,170],{},[61,156,157],{},"Routes can be defined dynamically and support RegEx URL matching",[61,159,160,163,164],{},[119,161,162],{},"IControllerFactory"," pops out the required ",[119,165,166],{},"IController",[61,168,169],{},"Routing is case insensitive by default",[61,171,172],{},"Support REST, blog engine, Jango style mappings etc. default is \u002Fcontroller\u002Faction\u002Fparameters",[53,174,176],{"id":175},"controllers","Controllers",[58,178,179,182,200,231],{},[61,180,181],{},"FrontController style",[61,183,184,186,187],{},[119,185,166],{}," exposes:\n",[58,188,189,194],{},[61,190,191],{},[119,192,193],{},"Execute(IHttpContext context, RouteData routeData)",[61,195,196,199],{},[119,197,198],{},"IViewEngine"," ViewEngine property",[61,201,202,203],{},"Some implementations available, all with virtual methods:\n",[58,204,205,211,221],{},[61,206,207,210],{},[119,208,209],{},"ControllerBase"," (adds dispatching)",[61,212,213,216,217,220],{},[119,214,215],{},"Controller"," (Populate parameters into ",[119,218,219],{},"ViewData[\"key\"]",")",[61,222,223,226,227,230],{},[119,224,225],{},"Controller\u003CT>"," (Populates parameters by making ",[119,228,229],{},"ViewData"," type T)",[61,232,233,234],{},"Attributes\n",[58,235,236,242,248],{},[61,237,238,241],{},[119,239,240],{},"[ControllerAction]"," attribute to expose methods as actions (secure default behavior by not exposing helper methods)",[61,243,244,247],{},[119,245,246],{},"Attribute"," for output caching",[61,249,250,253],{},[119,251,252],{},"[ControllerAction(DefaultAction=true)]"," to override default method of Index",[53,255,257],{"id":256},"parameters-to-the-controller","Parameters (to the controller)",[58,259,260,267,270],{},[61,261,262,263,266],{},"Automatically parsed where a ",[119,264,265],{},"TypeConverter"," exists",[61,268,269],{},"Future versions will support more complex serialization of types",[61,271,272],{},"Can be nullable: use null coalesce operator for defaults",[53,274,276],{"id":275},"view-engine","View Engine",[58,278,279,290],{},[61,280,281,283],{},[119,282,198],{},[58,284,285],{},[61,286,287],{},[119,288,289],{},"IView LoadView(string viewName)",[61,291,292,293],{},"Implementations include:\n",[58,294,295],{},[61,296,297],{},[119,298,299],{},"WebFormViewEngine",[53,301,303],{"id":302},"views","Views",[58,305,306,318],{},[61,307,308,311],{},[119,309,310],{},"IView",[58,312,313],{},[61,314,315],{},[119,316,317],{},"virtual void RenderView(object data)",[61,319,292,320],{},[58,321,322,334],{},[61,323,324,327,328,331,332],{},[119,325,326],{},"ViewPage",": pick up parameters from ",[119,329,330],{},"ViewData[\"\"]"," in conjunction with ",[119,333,215],{},[61,335,336,339,340,342,343],{},[119,337,338],{},"ViewPage\u003CT>"," pick up parameters from ",[119,341,229],{}," as type T in conjunction with ",[119,344,225],{},[53,346,348],{"id":347},"html","HTML",[58,350,351,354,357,363],{},[61,352,353],{},"Clean HTML generation (have they sorted out the id mangling by MasterPages\u002FINamingContainer?)",[61,355,356],{},"Static HTML class supports Link, PagingLinks and Url methods",[61,358,359,360],{},"Map to action names using Lambda expressions to ensure follows refactoring, e.g.\n",[119,361,362],{},"string url = Html.Link\u003CProductController>(controller =>controller.Edit(4);",[61,364,365],{},"Is there a way to follow the default action?",[53,367,369],{"id":368},"modeldata","Model\u002Fdata",[58,371,372,379,382],{},[61,373,374,375,378],{},"Pagination extension methods extend ",[119,376,377],{},"IQueryable"," for getting pages of data (skip, limit)",[61,380,381],{},"Pattern for view-update-view cycle",[61,383,384,385],{},"Object property to form field id mapping available and pluggable, allows\n",[58,386,387],{},[61,388,389],{},[119,390,391],{},"product.UpdateFrom(Request.Form)",[53,393,395],{"id":394},"testing","Testing",[58,397,398,401],{},[61,399,400],{},"Easy to write tests by using mock objects (request, response)",[61,402,403],{},"Unit testing framework project (NUnit, MBUnit, xUnit.NET)",[53,405,407],{"id":406},"finally","Finally",[58,409,410,413],{},[61,411,412],{},"What’s with ScottGu’s nametag, can the show’s organizers not afford anything more than a Post It note?",[61,414,415],{},"What cool software is Scott Hanselman using to do the screen-cast video\u002Fzoom\u002Foverlay\u002Fhighlighting?",[10,417,418],{},[419,420,421],"em",{},"[)amien",{"title":423,"searchDepth":424,"depth":424,"links":425},"",2,[426,427,428,429,430,431,432,433,434,435,436,437,438,439],{"id":55,"depth":424,"text":56},{"id":84,"depth":424,"text":85},{"id":102,"depth":424,"text":103},{"id":130,"depth":424,"text":131},{"id":142,"depth":424,"text":143},{"id":151,"depth":424,"text":152},{"id":175,"depth":424,"text":176},{"id":256,"depth":424,"text":257},{"id":275,"depth":424,"text":276},{"id":302,"depth":424,"text":303},{"id":347,"depth":424,"text":348},{"id":368,"depth":424,"text":369},{"id":394,"depth":424,"text":395},{"id":406,"depth":424,"text":407},"Development",9,"2007-10-09T14:55:04+00:00","[object Object]","md",null,false,{},3,true,"\u002Fblog\u002F2007\u002Fobservations-on-microsoft-mvc-for-aspnet",{"title":5,"description":12},"blog\u002F2007\u002Fobservations-on-microsoft-mvc-for-aspnet",[454,455,456],".NET","ASP.NET","ALT.NET","\u002Fblog\u002F2007\u002Fobservations-on-microsoft-mvc-for-aspnet\u002F",594,"IgDM70P9WTo25Mm5q3JhPY2LBlWEYRZAtX25dyF0f8Q",[461,465,469],{"title":462,"date":463,"url":464},"Transactions in the MongoDB EF Core Provider","2025-10-25","\u002Fblog\u002F2025\u002Fmongodb-explicit-transactions\u002F",{"title":466,"date":467,"url":468},"Queryable Encryption with the MongoDB EF Core Provider","2025-09-22","\u002Fblog\u002F2025\u002Fmongodb-queryable-encryption\u002F",{"title":470,"date":471,"url":472},"Lazy Loading with EF Core Proxies","2025-04-02","\u002Fblog\u002F2025\u002Fef-proxies\u002F",[],1780900530927]