Go to the first, previous, next, last section, table of contents.


The tools creating a dynamic web

Enhanced tools for handling and publishing dynamic documents are greatly needed, in particular for publishing documents on the web. As the number of World Wide Web users is constantly growing, and more content providers wish to adapt their web pages to the readers, the need for general and powerful solutions is increasing. Maintaining a big web site, with masses of information that is subject to change frequently, is a complicated and cumbersome task, requiring a large amount of resources and personnel. At the same time the demands on top sites to offer dynamic content is ever increasing.

There have been several attempts at creating a more dynamic web, or at least to some extent, and some of these "solutions" are techniques widely used by most top web sites today. But most solutions seriously lack in generality, introduce restrictive platform dependencies, and can be extremely hard and expensive to maintain. The need for new or improved tools is evident, and several approaches are possible.

Programs and CGI scripts

The classical solution for creating dynamical web content is to write a specialized program, or a script, following the Common Gateway Interface (CGI) standard for communication between a client browser and a server application. Basically, what most of these programs do are simple calculations, where after they output an HTML page from some prepared document template. The templates usually contain all the styling and layout fixed, and have special tags marking insertion points for document data. Processing the output templates can be extremely fast, leaving more time for content retrieval, etc.

Another programming approach is to include the actual program in the page, in the form of JavaScript or some other scripting language widely supported. These programs allow for pages to change content while reading them, but for security reasons they are mostly not allowed to access or change server data directly. Having scripts included in web pages is mostly used for changing document content on certain events, or for controlling user input on the fly, but not for actually generating the document layout and style.

There are several drawbacks to these types of solutions, however. First of all, writing a program for generating a document is much more difficult than just writing a document, and typically requires professional programmers. Secondly, having specialized programs producing the output for each and every page, causes great problems at the time of updating the page design or changing it's contents, making it complicated to change documents. In most cases, even for small changes, a programmer is required for changing the programs and fixing errors. Thirdly, and possibly most important, designing dynamic documents in this way causes a lot of "reinventing the wheel" and specialized solutions that cannot be reused. At the time of creating new documents, or changing an existing document, much of the previous work cannot be reused, and must be replaced with new program code.

The problems with maintaining programs and scripts are well known to software developers, and the work also requires a high level of technical knowledge, something which content providers often lack. The specialized solution is though, for now, the only solution for having dynamic data in web pages. It may be efficient in the use of machine resources when serving a document request, but maintaining an attractive and dynamic web site in this way can be both costly and inefficient.

Style sheets and transformation languages

As a result of recent standardization, new types of styling and layout methods are coming into use on the web. Most known of these is probably the Cascading Style Sheets (CSS1 [WB96] and CSS2 [WB98]), developed by the World Wide Web Consortium ( W3C), and being supported in a wide range of web browsers. The style sheet technology provides a separation between, on the one hand document content, and on the other hand style and layout information. By replacing or changing a single file, all web pages using that style sheet will change their rendering accordingly.

Style sheets also make it possible for readers with special preferences to overrule style and layout provided with the document. It is not obvious how to do this, however, and the current web browsers have no simple interface for changing the provided document style sheet parameters. Also, there is no uniform mechanism for specifying reader preferences across various style sheets, although that may be subject of future standardization (under the name of "user profile") [Bos98].

The really fundamental problem with style sheets, though, is that they are unable to modify document content; they only apply style and layout to the content. Neither can the styling easily be dynamic, changing with the document contents. In a style sheet it is typically impossible to express rules like "print all occurrences of `blue' in a blue color".

The more advanced approach to styling, that is increasingly becoming available, is represented by combined styling and transformation languages. There are several, including the Extensible Stylesheet Language (XSL and XSLT) [Cla99], that is currently being standardized at the W3C, and the Document Style Semantics and Specification Language (DSSSL) [Int96]. What these transformation languages offer, besides the styling possibilities of the style sheets, is the possibility of transforming data into anything. These languages are usually rule based, and deterministic with respect to the input data, i.e. the output is uniquely determined from the input data. No constraints, reader preferences or the like are processed, rather the transformations are straight mappings from data to a presentable document.

The transformation languages offer some interesting features, for example being able to operate on raw data from databases, and seem to be reaching widespread implementation. The drawback, though, is that this does not solve the problems with reader preferences or changing data contents. The transformation "programs" tend to be highly static and dependent on data, and must probably be changed if some aspect in the data changes.

Constraint based layout

A new and somewhat experimental approach is that of constraint based layout. Web pages are typically displayed on a wide number of devices; from pure text interfaces, via small monochrome displays, up to the 21" high resolution color screens. Writing a single style and layout for all of these devices is clearly inadequate, and using the largest common subset of styling features will result in poor resource usage. The solution for providing the optimum result on all devices, is allowing a flexible layout, something that can easily be expressed using constraints.

Constraints are expressed as logical relations between the values of the layout and style parameters. Typically the document, the browser and/or the reader would provide sets of default values for each one of the parameters, and the constraint engine then selects the best matching set, possibly by changing numeric values to reach certain criterion. A very inspiring article on constraint based layout for the web is [Bor98], which also contains an example of how the constraints could be expressed.

The optimum way for processing constraints would obviously be in the client, just like browser clients today process the style sheets. Actually, style sheets can probably be extended with constraint based layout and styling, but this is still far from being standardized. It looks to be a promising new technique, but there are several more years before the standard browser applications provides support for this type of features. A serious drawback with the constraint approach is also that it does not address the issue of processing the document data. A constraint based layout and style framework must be completed with other techniques for handling the dynamics of document content.

The RadioWeb approach

There is thus no single technique which solves all the problems related to dynamic document creation, and especially not in a general and stable manner. However, a very promising approach for constructing a general dynamic document system for the web today, is a combination of various techniques, attempting to use the strengths of each one. Constraints provide good and flexible control over layout and style parameters, transformation languages provide the exact data to output mapping, and server programs are still inevitable as the current browsers don't support more advanced layout features. A full system for producing and handling dynamic web documents must contain various components to be able to fully replace the programming required today.

One such system, aiming at providing tools for creating dynamic web pages for the radio broadcasting industry, is the one developed within the RadioWeb project [Par97]. The RadioWeb system consist of various components, as can be seen in figure 1. One component generates structured data from a data access description, a so called "WOF", written in a restricted and small programming language [CGT98]. Parts of the WOF description may also contain reader preferences, like for instance a favorite artist or song.

Another component is the LaSt language, that transforms the structured data into presentable HTML. By authoring rules that depend on reader preferences or data contents, various alternative layouts and styles can be created. A third component manages the CGI or Java servlet interface, and provides some set of reader preferences for the other components. For a full system there should of course also be tools providing graphical user interfaces controlling the various parts of the system.

Image:autofigarchitecture.jpg

Figure 1. A simplified architechture of the RadioWeb system.


Go to the first, previous, next, last section, table of contents.