Web themes apply styles/themes to web pages on the server side, allowing one web page to contain content, while using web themes to define the context. That is, all the content would be in one file, which simplifies the process of updating that information, while the web page contains pointers to the context information (like buttons, banners and other non-content information). These pointers retrieve the appropriate version of the context for the user, whether it is text only, or full graphics. Below (Figure 2: Example web page for Web themes) is an example of what the web page looks like on the server side. Each of the <SERVLET> code tags is replaced by the output of the servlet. The servlets retrieve the appropriate information from a database (part of which is repeated below in Figure 3: Example of the Web theme data), and return it as the output.
<HTML><HEAD> <TITLE>Web Themes Test sheet</TITLE> </HEAD>
<SERVLET CODE="theme"> <PARAM NAME="HTML" VALUE="Body"> <body>Your web server has not been configured to support servlet tags. </SERVLET>
<a href= "about/"><SERVLET CODE="theme"> <PARAM NAME="HTML" VALUE="About Us"> About Us </SERVLET></a>
<a href= "Catalogue/"><SERVLET CODE="theme"> <PARAM NAME="HTML" VALUE="Catalogue"> Catalogue </SERVLET></a>
<a href= "comingsoon/"><SERVLET CODE="theme"> <PARAM NAME="HTML" VALUE="Coming Soon"> Coming Soon </SERVLET></a>
<!-- Note: The text between the <PARAM> and the </SERVLET> tags is not really needed, as once the server is running correctly, they will never be seen (as it does not rely on the browser, like applets. They are present only for completeness. -->
</BODY></HTML>
Figure 2: Example web page for Web themes
Theme |
ID |
HTML |
---|---|---|
Text |
Body |
<body> |
Text |
About Us |
About Us |
Text |
Catalogue |
Catalogue |
Text |
Coming Soon |
Coming Soon |
Graphics |
Body |
<body background= "/images/background.gif"> |
Graphics |
About Us |
<img src="/images/about_us.gif" width="90" height="20" border="0"> |
Graphics |
Catalogue |
<img src="/images/catalogue.gif" width="90" height="20" border="0"> |
Graphics |
Coming Soon |
<img src="/images/coming_soon.gif" width="90" height="20" border="0"> |
Figure 3: Example of the Web theme data
Web themes were looked at as a possible help for web sites that maintain multiple versions of pages, each supporting different options, such as text only pages, and graphical pages. This is quite an important thing to do because not all web browsers support all of the latest display options (for example, graphics, sound, non-HTML formats, etc). Effectively web themes split the content of a web site from the context, which means that there is only one copy of the content to keep up to date, as when multiple copies are used, it can become difficult to keep all of them up to date with each other. The web themes engine used SSI (Server Side Includes) in the first prototype, and Java servlets in a later prototype to include the activate content into the web page. This would then fetch the appropriate information from a database and return it to the web browser, thereby allowing one source document to be viewed in several ways, so text and graphical versions of the page, or any other type, could all be created from the same content.
Although the idea was to split the content from the context, if the pages were interpreted instead of including dynamic content, it would be possible to layer both the content and context. Then it would be possible to create templates for all of the pages on a site, and create pages recursively on the fly by allowing inclusion of sub-site templates for different layout of different sub-sites. For example, there may be one template that controls the overall look of the whole web site, which includes content and context from other authors. Each author's content and context could contain versions for each output type they want to support, which can be repeated recursively for larger sites that have many levels between the full web site layout and the individual authors of each page. This would mean that each document may contain content and context from several different authors, all custom built for the person that is currently viewing the document, but there is only one set of content to keep up to date. It also has the side effect of allowing authors to delegate specific portions of a document to others, while maintaining the overall feel of their portion.
It was decided to leave the idea of web themes at the second prototype stage because there were others with similar ideas at the time (circa 1998), and because ideas were looking promising to follow with regard to research on co-operative authoring and collaboration. Today there are options for using XML (http://www.w3.org/XML/) and transformational XSL (http://www.w3.org/Style/XSL/), or JSP (http://java.sun.com/products/jsp/) with XML or HTML.
Previous: | 4.00 Design through to testing |
Next: | 4.02 Multi-tiered web sites |