Microsoft will launch its own MVC Framework (altnetconf-Scott Guthrie announces ASP. net mvc Framework at alt. Net conf)

Source: Internet
Author: User
/* Rating
I believe this is something that many comrades like me working on Enterprise Asp.net are doing or have already done. But in any case, Microsoft cannot stop others. It is also a good thing. People in the province shouted to support enterprise development, but they didn't even have a decent enterprise framework. Not to mention the support of others. It's just another product ......
I hope that this is not the first time you get involved, even though it is Microsoft's consistent style. I would also like to thank open source for its pressure on Microsoft!
*/

URL: http://codebetter.com/blogs/jeffrey.palermo/archive/2007/10/05/altnetconf-scott-guthrie-announces-asp-net-mvc-framework-at-alt-net-conf.aspx

Altnetconf-Scott Guthrie announces ASP. net mvc Framework at alt. Net Conf

Scott Guthrie proposed a topic at the alt. net conference today, and the topic was an overview of the MVC Framework his team is working on. his topic is actually the first timeslot of the conference at 9: 30 am tomorrow morning. just about everyone showed interest, so I wouldn't be surprised to see most of the folks just listening.

Scott and I had supper after the opening, and I have Ed a personal demo of the prototype. First, here are some of the goals:

  • Natively support TDD model for controllers.
  • Provide aspx (without viewstate or postbacks) as a view Engine
  • Provide a hook for other view engines from monorail, etc.
  • Support IOC containers for controller creation and di on the Controllers
  • Provide complete control over URLs and navigation
  • Be pluggable throughout
  • Separation of concerns
  • Integrate nicely within ASP. NET
  • Support static as well as dynamic ages

I'm sure I missed some of the Goals, and more people will blog their takeaways since this all is public information.

The first question might be:Is webforms going away? Do I have to rewrite my web applications?Some people might wish, but no. both models will be supported and even be supported within the same web application. i, for one, after seeing this, think it is very good, and my company will be recommending it to our clients.

We might get a public CTP by the end of the year, and it will be released in a similar fashion as ASP. net Ajax was, as an add-on after the Visual Studio 2008 release some time next year.

URLs

The default URL scheme will look something like this:

/<Routename>/<action>/<param1>/<param2>

Where routename is configured to map to somecontroller. Multiple Routes can map to the same controller for the purpose of providing more URLs (think Seo ).

The developer can completely override the URL Processing also by providing an implementation of an interface.

Controllers

Controllers will inherit from a base class by default, but it doesn't hinder unit testing, and it's not even required. I'll probably use the option of implementingIcontrollerInterface instead and creating a controller factory to support controller creation using my IOC container of choice (currently structuremap). In this manner, I implement an interface with one method that acceptsIhttpcontext(Yep, we have an interface now), andRoutedata, A simple DTO that operator des the action and parameters for the Web Request (parsed from the URL scheme you are using ).

Views

Like I said before, nvelocity, Brail, etc can be bolted on as view engines, and aspx is provided as a view engine (the only thing that has been changed is that the Code-behind will inherit fromViewpage As opposed to the currentPage). Controllers can either using iviewengine (I think that's the name) to request a view by name (key) or using a helper method on the optional controller base classRenderview (string, viewdata). The default model uses a DTO for the objects passed to the view, so it is similar to monorail's property bag doesn't it's a stronugly-typed DTO (using generics for that ), so when you rename stuff with resharper, you don't have to worry about any string literals lying around.

My impressions

I first saw the early prototype in March of this year, and I was encouraged. I was able to give some early feedback, which has already been enmo-ated into the product. i'm not one to promote a Microsoft offering just because it's there (I have never recommended the use of mstest over nunit, for instance), but I will say this:As soon as I can get my hands on a build, I will be building something with it.I am very encouraged by this, and I think they are going in the right direction. while they have chosen a model to use with demos, they have broken down the Wils. interfaces abound, and none of it isSealed. I will start by swapping out the Controller factory so I can get my IOC container in the mix, but it's easy to do. for testing, there is no coupling of the controller. the views are decoupled. the httpcontext is decoupled with the new ihttpcontext interface. the actions are simple public methods with an attribute attached to them ([Controlleraction], I think ).

Isn't it just like monorail?

Someone using monorail for more serious project than me can comment more intelligently, but here goes. monorail is MVC. this is MVC, so yes, it's very similar but different. this gives us a controller that executes before a view ever comes into play,AndIt simplifies aspx as a view engine by getting rid of viewstate and server-side postbacks with the event lifecycle. That's about it. Monorail isMuchMore. monorail has tight integration with Windsor, activerecord and several view engines. monorail is more than just the MVC part. I wouldn't be surprised if monorail were refactored to take advantage of the ASP. net MVC httphandler just as a means to reduce the codebase a bit. I think it wowould be a very easy move, and it wowould probably encourage monorail adoption (even beyond its current popularity ).

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.