Java Reference
In-Depth Information
Both technologies can be exploited to build GIS services. What should be
carefully evaluated is their different impact on performance, i.e. on the
network traffic that they generate when the client selects a geographic
feature and waits for the associated information to be displayed.
Decision point
Java Servlets or Java Applets?
The central point of a GIS service implementation is display of the carto-
graphic map on the web browser. If we choose the servlet technology, a
cartographic map is encoded as a jpg image (or another standard format)
and embedded in an HTML page. Whenever the user selects a new map or
wants a different layer to be displayed on it, the servlet encodes a new jpg
image and sends it to the client's web browser. The selection of geographic
features on the cartographic map is handled by the web browser itself, since
it is able to get the coordinates of the mouse pointer on the image and send
them to the remote servlet. Using these coordinates, the servlet can identify
the selected feature and compose a new HTML page with the associated
information. It is clear that the transmission of images through the internet
may cause appreciable delays in the transition from the visualization of a
map layer or map entity to another one.
An applet does not have this disadvantage, since it behaves like a standard
graphical user interface that is able to draw graphics and display images
locally. When the user selects a cartographic map, the applet retrieves from
the application server the map's XML description and instantiates in the
client's PC memory the objects corresponding to all the map layers and map
entities. No further communication is required between the applet and the
remote application server when the user wants a new layer or entity to be
visualized on the map. The applet manages the entity selection in the same
way as the graphical editor and the data linker. It sends the identifier of the
selected entity to the remote application server which queries the database
and sends the associated information back to the applet. From the point of
view of network traffic and user interaction, the applet solution is more
convenient and user friendly.
Decision point
How are the GIS functionalities partitioned in the three-tier architecture?
The GIS application server acts as a middle layer between the applet
and the database. As such, it basically extends the functionalities of
class DBConnector to handle multiple client requests at any one time (see
Search WWH ::

Custom Search