1、 - 1 - 外文原文 To stay disconnected, the client must queue updates locally on the client and only send the batch when the user connects to the server. In the Java Smart Ticket sample application, the client allows users to pinpoint the exact seats they want to buy. When the user decides what show he or
2、 she wants to see, the client downloads the data for the shows seating plan and displays the plan to the user. The plan indicates which seats are available and which have already been taken, as shown in Figure 3.5. This example highlights two important issues. First, when Java clients manipulate ent
3、erprise data, they need to know about the model and some or all of the business rules surrounding the data model. For example, the client must understand the concept of booked and unbooked seats, and model that concept just like the server does. For another example, the client must also prevent user
4、s from trying to select booked seats, enforcing a business rule also implemented on the server. Generally, clients manipulating enterprise data must duplicate logic on the server, because the server must enforce all business rules regardless of what it sclients do. Second, when Java clients manipulate enterprise data, applications need to implement data synchronization schemes. For example, between the time when the user downloads the seating plan and the time when the user decides what seat s