国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
MVC

Models: Model objects are theparts of the application that implement the logic for the application’s datadomain. Often, model objects retrieve and store model state in a database. Forexample, a Product object might retrieve information from a database, operateon it, and then write updated information back to a Products table in SQLServer.

 

Views: Viewsare the components that display the application’s user interface(UI).Typically, this UI is created from the model data. An example would be an editview of a Products table that displays text boxes, drop-down lists, and checkboxes based on the current state of a Products object.

 

Controllers: Controllers are thecomponents that handle user interaction, work with the model, and ultimatelyselect a view to render that displays UI. In an MVC application, the view onlydisplays information; the controller handles and responds to user input andinteraction. For example, the controller handles query-string values, andpasses these values to the model, which in turn queries the database by usingthe values.

 

MVC & ASP.NET Web Forms

You must consider carefully whether toimplement a Web application by using either the ASP.NET MVC framework or theASP.NET Web Forms model. The MVC framework does not replace the Web Formsmodel; you can use either framework for Web applications.(If you have existingWeb Form-based applications, these continue to work exactly as they alwayshave.)

 

Features of the ASP.NET MVC Framework

TheASP.NET MVC framework provides the following features:

l        Separtion of applicationtasks(input logic, business logic and UI logic), testability, and test-drivendevelopment(TDD) by default. All core contracts in the MVC framework areinterface-based and can be tested by using mock objects, which are simulatedobjects that imitate the behavior of actual objects in the application. You canunit-test the application without having to run the controllers in an ASP.NETprocess, which makes unit testing fast and flexible. You can use anyunit-testing framework that is compatible with the .NET Framework.

l        An extensible and pluggableframework. The components of the ASP.NET MVC framework are designed so thatthey can be easily replaced or customized. You can plug in your own viewengine, URL routing policy, action-method parameter serialization, and othercomponents. You can plug in your own view engine, URL routing policy,action-method parameter serialization, and other components. The ASP.NET MVCframework also supports the use of Dependency Injection(DI) and Inversion ofControl(IOC) container models. DI allows you to inject objects into a class ,instead of relying on the class to create the object it self. IOC specifiesthat if an object requires another object, the first objects should get thesecond object from an outside source such as a configuration file. This makestesting easier.

l        A powerful URL-mappingcomponent that lets you build applications that have comprehensible andsearchable URLs. URLs do not have to include file-name extensions, and are designedto support URL naming patterns that work well for search engineoptimization(SEO) and representational state transfer(REST) addressing.

l        Support for using the markup inexisting ASP.NET page (.aspx files), user control(.ascx files), and masterpage(.master files) markup files as view templates. You can use existingASP.NET features with the ASP.NET MVC framework, such as nested master pages,in-line expression(<%=%>),declarative server controls,templates,data-bingding, localization, and so on.

l        Support for existing ASP.NETfeatures. ASP.NET MVC lets you use features such as forms authentication andWindow authentication, URL authorization, membership and roles, output and datacaching, session and profile state management, health monitoring, the configurationsystem, and the provider architecture.

 

 

參考:MSDN MVC部分

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
ASP .NET MVC 之Entity Framework
學(xué)習(xí)ASP.NET MVC的基本概念
學(xué)習(xí) ASP.NET MVC (第三回)實(shí)戰(zhàn)篇
.NET和J2EE該相互學(xué)習(xí)什么
ASP.NET MVC隨想錄(1):漫談OWIN
ASP.NET MVC隨想錄——鋒利的KATANA
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服