01 2011 档案
摘要:Brad Wilson在他自己的博客写了有关ASP.NET MVC3依赖注入支持的一系列文章,但由于某些原因(你懂的),需要FQ才能阅读。为了方便自己也方便喜欢的同学,特意FQ再拷贝回来发布,以下是这一系列文章的索引:Part 1: IntroductionPart 2: ControllersPart 3: View Engines/View PagesPart 4: FiltersPart 5: IDependencyResolverPart 6: Model ValidationPart 7: Model MetadataPart 8: Value ProvidersPart 9: Mo
阅读全文
摘要:View Page ActivatorIn ASP.NET MVC, it’s common for views to be compiled into classes. In MVC 1.0, we shipped theWebFormViewEngineas the default view engine, which allowed the user to write views using the familiar % % syntax from ASP.NET WebForms. The first time the view is rendered, the view file
阅读全文
摘要:Controller ActivatorIn MVC 1.0, we introducedIControllerFactoryto allow better dependency injection of controller instances. We also provided theDefaultControllerFactory, which created controller instances with Activator.CreateInstance. Some of this is discussed inPart 2of this series.We realized th
阅读全文
摘要:Value ProvidersASP.NET MVC 2 introduced a new method to find value providers: theValueProviderFactoryclass. Value providers are used by the model binding system in MVC to populate the values of model objects. MVC includes value providers for several common value sources (including query string, form
阅读全文
摘要:Model BindersASP.NET MVC 1.0 introduced theIModelBinderinterface. Developers who implement this interface are responsible for creating models from values obtained from value providers. In ASP.NET MVC 3, we introduced a new interface (IModelBinderProvider) which allows developers to dynamically provi
阅读全文
摘要:Model MetadataASP.NET MVC 2 introduced an extensible model metadata system where developers could implement a class which derived fromModelMetadataProviderto provide meta-information about the models in the system. In ASP.NET MVC 3, we have made the metadata provider findable via the dependency reso
阅读全文
摘要:Model ValidatorsASP.NET MVC 2 introduced an extensible model validation system where developers could implement a class which derived fromModelValidatorProviderto influence the validation process on both the client-side and server-side. In ASP.NET MVC 3, we have made these validator providers findab
阅读全文
摘要:What's New Since Preview 1?We shippedASP.NET MVC 3 Betatoday, and with it we’ve made some significant progress (and departures) from the MVC 3 Preview 1 build released in July as it pertains to service location.We received significant feedback during the Preview 1 time frame about our use proposed u
阅读全文
摘要:Important UpdateWe've made significant changes to the IoC support in ASP.NET MVC 3 Beta. Please readPart 5for more information.Filters and Filter ProvidersWe introduced the concept of filters in ASP.NET MVC 1.0. A filter can implement one of more of the following interfaces:IActionFilter,IResultFilt
阅读全文
摘要:Important UpdateWe've made significant changes to the IoC support in ASP.NET MVC 3 Beta. Please readPart 5for more information.View Engine Registration and View Page CreationASP.NET MVC 1.0 introduced View Engines (implementingIViewEngineandIView), shipping with the single WebForms-based view engine
阅读全文
摘要:Important UpdateWe've made significant changes to the IoC support in ASP.NET MVC 3 Beta. Please readPart 5for more information.Controller CreationThe most common form of service location today in ASP.NET MVC is for controller creation. In MVC 1.0, we created an interface namedIControllerFactorywhich
阅读全文
摘要:Important UpdateWe've made significant changes to the IoC support in ASP.NET MVC 3 Beta. Please readPart 5for more information.IntroductionOne of the new features in ASP.NET MVC 3 is the ability to register a service locator that will be used by the framework. Prior versions of the MVC framework hav
阅读全文