In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how to outline the core framework of ASP.NET MVC and FubuMVC, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Another aspect of the MVC pattern is that it allows developers to unit test parts of UI that traditionally cannot be tested. Chad describes how Microsoft did this:
Microsoft has taken a big step forward in its recent update to the MVC framework (Beta,RC and final release), which has better support for unit testing than Preview 3. But I still think that overuse of inheritance and prevention code and deliberate non-use of interfaces make testing in ASP.NET MVC cumbersome.
He went on to explain how FubuMVC implements this model:
Instead, FubuMVC uses a simple, easy-to-mock interface, focusing on high cohesion and low coupling designs. Among them, low coupling is more successful, but all this is still under development, and I hope that future designs will improve the degree of cohesion.
FubuMVC is highly dependent on the SOLID principle, which gives it a high degree of flexibility, and developers can replace the entire set of parts in the framework with just one mock, and can use any mock framework they like.
FubuMVC doesn't have a lot of defensive code. Instead, it focuses on designing components that provide free control, and these constructs are the main places where client code exists: controller, behavior, view, and parts that can be overloaded.
There are few dependencies between FubuMVC classes, and the only dependencies are on interfaces, which can be easily simulated with mock objects.
FubuMVC core framework
Since Jeremy (the creator of the IoC container StructureMap) is included in the project, you might think that inversion of control and IoC containers will be more supported, and in fact they are:
The current version only supports StructureMap, but support for other containers is likely to be added in the future. The framework makes very little use of containers and is limited to configuration. The rest is done using the container's auto-binding feature, so "service location" is basically not used. For the only bit of service location, we use Microsoft Patterns and Practices's Common Service Locator for processing, which allows us to easily replace the underlying IoC containers attached to the CSL schema (most containers meet this condition).
FubuMVC also has a contrib project, and how is the goal of this project different from that of the FubuMVC core framework:
We wanted more freedom to develop FubuMVC, so we established FubuMVC Contrib. We want to try plug-ins so that more people can participate and they can try more with fewer restrictions while keeping the core framework stable.
The FubuMVC core framework will maintain a few members, will be more cautious about patches, and will make fewer changes to the framework. FubuMVC-Contrib will have more participants, more changes, lower requirements, and may have code that doesn't work or experimental code. When something interesting has been developed in contrib, you can merge it into the core framework or split it into separate projects.
Today, FubuMVC is not as mature as ASP.NET MVC, but its implementation is very interesting. We will wait and see how this framework will develop and how it will differ from that of ASP.NET MVC. For more information about FubuMVC, you can check out their wiki and Ryan Kelley tutorials to learn FubuMVC from scratch.
The above is how to summarize the core framework of ASP.NET MVC and FubuMVC. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.