tailieunhanh - Quản lý nhà nước trong ứng dụng Web

Các trang Web và sử dụng Framework giao thức HTTP để giao tiếp giữa một trình duyệt web và một máy chủ Web. HTTP là một giao thức không quốc tịch và có thể không tự động cho biết các yêu cầu liên tiếp đến từ các khách hàng giống nhau hoặc khác nhau. Vì vậy, khi một trang web được đưa lên máy chủ, một thể hiện mới của lớp trang Web được tạo ra. Điều này dẫn đến sự mất mát của tất cả các thông tin liên quan đến trang và các điều khiển đặt trên. | Managing State in Web Applications Web pages and Framework use HTTP protocol to communicate between a Web browser and a Web server. HTTP is a stateless protocol and cannot automatically indicate whether the sequential requests are coming from the same or different clients. Therefore when a Web page is posted to the server a new instance of the Web page class is created. This results in the loss of all the information associated with the page and the controls placed on it. To overcome this limitation provides the state management feature. In addition it provides a feature called caching that helps you improve the performance of your Web application. This chapter discusses the various client-side and server-side state management options provided by . In addition it discusses how to improve the performance of a Web application by using caching. Objectives In this chapter you will learn to ỆI Implement client-side state management ỆI Implement server-side state management ỆI Manage state by using cross-page posting ỆI Implement caching Chapter 5 Implementing Client-Side State Management A new instance of the Web page class is created each time the page is posted to the server. In traditional Web programming this would typically mean that all information associated with the page and the controls on the page would be lost with each round trip. Consider an example. Suppose a user fills up some personal information on a Web form. While filling up this information the user selects a country from a drop-down list on the Web page. As soon as the user selects a country the page needs to be posted back to the server to retrieve a list of state names which need to be populated in another drop-down list on the same Web page. When the page is posted to the server a new instance of the Web page class will be created and therefore all information previously entered on the Web page will be lost. This problem can be solved by using client-side state management.

crossorigin="anonymous">
Đã 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.