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

MVC Framework tách rời các models, các views và các controllers của MVC bẳng cách dùng các Interface (trong ngôn ngữ lập trình), bằng cách đó giúp cho các thành phần này có thể test độc lập với nhau. View engine trong MVC framework chính là các trang aspx, ascx để hiển thị giao diện. | 320 CHAPTER 9 CONTROLLERS AND ACTIONS rip You can also use the ContextMocks object to simulate extra conditions during the Arrange phase . x .Returns POST . Summary MVC architecture is designed around controllers. Controllers consist of a set of named pieces of functionality known as actions. Each action implements application logic without being responsible for the gritty details of HTML generation so it can remain simple clean and testable. In this chapter you learned how to create and use controller classes. You saw how to access incoming data through context objects and parameter binding how to produce output through the action results system how to create reusable behaviors that you can tag on as filter attributes how to implement a custom controller factory or customize action selection logic and how to write unit tests for your action methods. In the next chapter you ll study the MVC Framework s built-in view engine and your many options for transforming a Model object or a ViewData structure into a finished page of HTML. CHAPTER 10 Views Seen from outside web applications are black boxes that convert requests into responses URL goes in HTML comes out. Routing controllers and actions are important parts of ASPNET MVC s internal machinery but it would all be for nothing if you didn t produce some HTML. In MVC architecture views are responsible for constructing that completed output. You ve seen views at work in many examples already so you know roughly what they do. It s now time to focus and clarify that knowledge. By reading this chapter you ll learn the following How .aspx view pages work behind the scenes Five primary ways to add dynamic content to a WebForms view How to create reusable controls that fit into MVC architecture and how to use them in master pages Alternatives to the WebForms view engine including how to create a custom view engine How Views Fit into MVC Most software developers understand that UI

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.