Web applications have a distributed execution model(分布式执行模型). When a user interacts with a Web form, the browser might respond to some of the user actions by executing client-side scripts while some other actions that require server resources must be sent to the Web server for processing. When server-side processing is involved, a typical interactive user session with a Web form consists of the following steps:
1. User requests a Web form from the Web server.
2. Web Server responds back with the requested Web form.
3. User enters the data and submits the form to the Web server.
4. Web Server processes the form and sends the result back to the user.
Step 3 is also referred to as a page postback, whereas steps 3 and 4 are collectively referred to as a roundtrip. A roundtrip involves making a complete trip over the network to the Web server and getting the response back.
The Web applications use HTTP to establish communication between the Web browser and the Web server. HTTP is disconnected in nature(实际上HTTP是非面向连接的), which means that the life cycle of a Web page is just a single roundtrip(它的生命周期只有一个来回). Every time a Web server responds to a page request, it freshly creates the resources required to create the page,sends the page to the requesting client and destroys the page resources from the server.(发来的咚咚放在了客户端的缓存里) Between two page requests, Web server and the clients are disconnected with each other, and values of page variables and controls are not preserved across the page requests.
This model of execution allows a Web server to support a large umber of clients because each client request occupies the server resources only for a short duration. However, the disconnected nature of HTTP provides a major challenge to the Web developers to implement the following functionality in their applications:
1. Maintain values of controls and variables across page postbacks.
2. Distinguish the initial request of a page from the page postback.
3. Provide smart navigation features similar to that of desktop applications.
1. User requests a Web form from the Web server.
2. Web Server responds back with the requested Web form.
3. User enters the data and submits the form to the Web server.
4. Web Server processes the form and sends the result back to the user.
Step 3 is also referred to as a page postback, whereas steps 3 and 4 are collectively referred to as a roundtrip. A roundtrip involves making a complete trip over the network to the Web server and getting the response back.
The Web applications use HTTP to establish communication between the Web browser and the Web server. HTTP is disconnected in nature(实际上HTTP是非面向连接的), which means that the life cycle of a Web page is just a single roundtrip(它的生命周期只有一个来回). Every time a Web server responds to a page request, it freshly creates the resources required to create the page,sends the page to the requesting client and destroys the page resources from the server.(发来的咚咚放在了客户端的缓存里) Between two page requests, Web server and the clients are disconnected with each other, and values of page variables and controls are not preserved across the page requests.
This model of execution allows a Web server to support a large umber of clients because each client request occupies the server resources only for a short duration. However, the disconnected nature of HTTP provides a major challenge to the Web developers to implement the following functionality in their applications:
1. Maintain values of controls and variables across page postbacks.
2. Distinguish the initial request of a page from the page postback.
3. Provide smart navigation features similar to that of desktop applications.

浙公网安备 33010602011771号