Ajax in Action phần 4

mà một phông chữ mong muốn không được cài đặt trên một máy khách hàng. Để một đoạn trong văn bản màu xám, thiết bị đầu cuối, phong cách, phong cách, chúng ta có thể xác định một phong cách: | The details exchanging data 175 Client-only interactions A client-only interaction is one in which a user interaction is processed by a script that has already been loaded into the browser. No recourse to the web server the old presentation tier is necessary which is good for responsiveness and for server load. Such an interaction is suitable for relatively trivial calculations such as adding a sales tax or shipping charge to a customer s order. In general for this approach to be effective the client-side logic that processes the interaction needs to be small and unchanging during the lifetime of the customer interaction. In the case of shipping options we are on safe ground because the number of options will be of the order of two to five not several thousands unlike say the full catalog of an online retailer and the shipping costs are unlikely to change from one minute to the next unlike say a stock ticker or first-come-first-served ticket-reservation system . This type of interaction has already been explored in chapter 4 s discussion of the client-side Controller so we ll say no more about it here. The remaining three categories all involve a trip back to the server and differ primarily in what is fetched. The key differences are summarized in the following sections along with the pros and cons of each. Introducing the planet browser example Before we dive in to the different data exchange mechanisms let s introduce a simple example to serve as a hook on which to hang our arguments. The application will present a range of facts about the planets of our solar system. Our main screen shows an idealized view of the solar system with an icon for each planet. On the server we have recorded various facts about these planets which can be brought up in pop-up windows by clicking on the planet s icon figure . We aren t using the ObjectViewer from chapter 4 here but we will get back to it later in this chapter. The part of the puzzle that interests us now

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã 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.