Chapter 5 Client Design
237
the client and endpoint makes them tightly coupled. As such, developers should
use this approach only when a tightly coupled situation is acceptable or required,
or when the client and service endpoint responsibilities are clearly documented.
5.4.1.2
Synchronizing Shared State among Clients
There are times when multiple Web service clients share state among themselves.
Such shared state may be read only or it may be state that is updated. Read only
state does not require synchronization since clients are retrieving data only, they
may poll the service at intervals and obtain current data. However, it is possible for
other Web clients to concurrently update shared data. Data consistency is an issue
when one or more clients may be manipulating the same data at the same time. 
An example use case that illustrates sharing modifiable state among Web
service clients might be purchase order management client application. The appli 
cation accesses a set of purchase orders that require manual approval. After the
user manually processes these orders offline, the application uploads them to the
service. It is conceivable that two such client applications may each download
some of the same purchase orders, and some of these orders may be changed inde 
pendent of each other. After the first client application uploads its changed data to
the service, there is a data consistency problem if the second application tries to
upload its modified data.
To prevent such inconsistencies, the client developer should keep certain con 
siderations in mind. The developer can detect data inconsistency using techniques
such as time stamp checking or checksum analysis before uploading modified
data, and this may require cooperation from the service endpoint. Data locking is
another technique to avoid simultaneous changes to the same data. A service end 
point could throw a service specific exception indicating that data has been modi 
fied by another client and might be out of sync. The client application can be
designed to overwrite the service endpoint copy, or it can ask the user to re enter
the data. Both client and service endpoint developers need to ensure that their
respective applications handle such inconsistencies properly.
5.4.2 Enhancing User Experience
The dynamics of the user interface play a large role in determining the quality of a
user's experience. J2SE clients have the advantage of drawing on a rich set of APIs,
in particular the Swing APIs, to make the user experience the highest quality possi 
ble. These APIs give J2SE clients the ability to query a Web service in the back 






New Page 1








Home : About Us : Network : Services : Support : FAQ : Control Panel : Order Online : Sitemap : Contact : Terms Of Service

java web hosting

 

 

 Our partners: | PHP: Hypertext Preprocessor | Best Web Hosting | Java Servlet Web Hosting | Inexpensive Web Hosting |

Jsp Web Hosting | Cheapest Web Hosting | Jsp Hosting | Cheap Hosting

 

Virtualwebstudio. Business web hosting division of Web Design Plus. All rights reserved