- 36 -
4.
For every request, the server has to spend a lot of resources formatting
information.
5.
Every page sent to the client invariably contains more formatting information
than raw content. This results in large files and slow data transfers.
All said and done, though, this solution, however clunky, works. Nevertheless it remains
clunky, and, as your clientele increases, your Web server is going to get more and more
bogged down over time. Your Web master will come to you very quickly with customer
complaints about poor performance, and your competitors will start receiving some of
your clients very quickly. Perish that thought. You’ve got to come up with a better
solution! Let’s see how XML can help out.
The XML-Based Three-Tier Solution
In our discussion above, the real bottlenecks are at the server’s end. One of the primary
reasons for this is that the size of each page sent to the client is inflated by formatting
information. By using a system that employs XML coupled with XSL stylesheets, users
perform a one-time download of the stylesheet. On every ping to the Web server
thereafter, users receive only raw content information (articles, stock updates, sports
scores), and the formatting is applied by the stylesheet(s) that is cached at their end.
Figure 2.12 shows XML in a classic three-tier solution model. You still need your Web
server and several other classic modules. What XML does is add in an abstract layer that
connects the Web server with the client in a richer way than is currently possible. Using
the middle tier, you are able to integrate information from many disparate information
sources.
Figure 2.12:
XML as applied in the classic three-tier application model.
The following example is used to illustrate how XML can, will, and is being used and all
uses are based on a similar model.