Another MVC implementation on ASP. NET: FubuMVC (1)

Source: Internet
Author: User

Prior to the official release of ASP. net mvc, Jeremy D. Miller and Chad Myers made some work in earlier versions of ASP. net mvc and made some modifications to the underlying implementation. Later, they changed almost all ASP. net mvc implementations and decided to construct another MVC implementation FubuMVC. Soon after, Mark Nijhof was invited to join the project and become a major Member.

Fubu stands For "For us, by us ". Currently, FubuMVC does not use any ASP. net mvc implementation Code except ASP. NET Routing. ASP. NET Routing is included in. NET Framework 3.5 SP1.

Jon Arild T ø rresda asked Chad Myers, what is the biggest difference between ASP. net mvc and FubuMVC:

If you have to select one, I select "inheritance of the combination pair ". This is a basic design difference, but it does not mean ASP. net mvc design is not good, but I think ASP. net mvc tends to use inheritance in class structure design, so it is not as easy to design dynamic Web applications as using combinations.

FubuMVC is a Front-end Controller) framework. Chad points out that the two main objectives of this model are:

◆ Separate different request concerns

◆ Allow the combination to construct a response and send it back to the client

For the front-end controller, Chad explains: "We are not unable to use ASP. net mvc to implement the front-end controller, but this is very difficult ".

FubuMVC has many implementation decisions, one of which is the "Action" executed before and after the Controller Action is executed ". Chad explains why they call it behavior and its meaning in FubuMVC.

When I'm in a Virual ALT. NETVAN) When I demonstrated to some people earlier versions of FubuMVC, Steven Harman (http://stevenharman.net) suggested that I call it "behavior" because it accurately describes what happened, I like this name a bit.

In FubuMVC, the implementation of behavior is actually a mixture of the decoration mode and the responsibility chain mode.

Action has full control over the request pipeline. It can add or modify requests, dynamically select the action to be executed, and whether to execute the action. It can modify or completely replace the output result of the action, in addition, some code can be executed after the request is processed. In fact, generating the display result is also an action. FubuMVC uses behaviors to implement basic functions. These basic functions and behaviors can be replaced or modified as needed.

Mark Nijhof shows this pipeline in his article FubuMVC and the Front Controller style framework:

Chad said, "actions enable the possibility that is hard to implement in other frameworks ":

◆ Ability to encapsulate the entire request in try/catch/finally Blocks

◆ Multi-level cache capability

◆ Dynamically determines the action to be executed based on the runtime environment or request time


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.