TAILIEUCHUNG - Pro ASP.NET MVC Framework phần 5

Các lớp Code Behind của đều kế thừa từ , như vậy controller theo kiểu này cũng không thể dùng Unit Test để test các xử lý bussines logic. Đó là điều mà các fan của Unit Test không thể chấp nhận được. Ngoài ra, với sự phụ thuộc vào namespace như vậy, những xử lý của bạn sẽ không thể sử dụng lại khi muốn đổi một ứng dụng web sang ứng dụng windows form. | CHAPTER 7 OVERVIEW OF MVC PROJECTS 207 Note As you ll learn in Chapter 14 you deploy an MVC application by copying much of this folder structure to your web server. For security reasons IIS won t serve files whose full paths contain bin App_code App_GlobalResources App_LocalResources App_WebReferences App_Data or App_Browsers because IIS 7 s file contains hiddenSegments nodes hiding them. IIS 6 won t serve them either because it has an ISAPI extension called that is hard-coded to filter them out. Similarly IIS is configured to filter out requests for .asax .ascx .sitemap .resx .mdb .mdf .ldf .csproj and various others. Those are the files you get by default when creating a new ASRNET MVC web application but there are also other folders and files that if they exist can have special meanings to the core ASRNET platform. These are described in Table 7-2. Table 7-2. Optional Files and Folders That Have Special Meanings Folder or File Meaning App GlobalResources Contain resource files used for localizing WebForms pages. You ll App_LocalResources learn more about localization in Chapter 15. App_Browsers Contains .browser XML files that describe how to identify specific web browsers and what such browsers are capable of . whether they support JavaScript . App_Themes Contains WebForms themes including .skin files that influence how WebForms controls are rendered. These last few are really part of the core ASRNET platform and aren t necessarily so relevant for ASRNET MVC applications. For more information about these consult a dedicated ASRNET platform reference. Naming Conventions As you will have noticed by now ASRNET MVC prefers convention over This means for example that you don t have to configure explicit associations between controllers and their views you simply follow a certain naming convention and it just works. To be fair there s still a lot of configuration you ll end up doing in .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.