| Sun Microsystems Laboratories Experimental Stuff | Site Technology |
Although Brazil is intended to be used for content aggregation and portal services, it may also be used for more traditional web site construction.
This site was built using Brazil Framework. In lay-men's terms, the host computer is running the Brazil project framework as a web server (you can download a copy here). The content is mostly HTML (and images), but includes some additional markup that is interpreted by the server instead of your browser.
This page will contain a tutorial explaining how the Brazil web framework is used to build this site. We have attempted to use various features of the Brazil system to explore some of the capabilities of the framework. Due to the nature of this site, only a small fraction of the Brazil features will be presented.
Until then, the following links contain the raw HTML (plus Brazil framework specific XML markup), along with the server configuration file we use. Together, the configuration and the XML marked-up HTML pages interact to provide the functionality that would require CGI scripts, Servlets, or their equivalent in other web service environments.
The basic operation of the server, as defined in the configuration file, consists of four steps. The first step happens once, the others occur for each HTML page.
When enabled, all content on this site with links to the relevant portions of www.sun.com are dynamically rewritten to change the links to point to a URL on this site, which will then fetch the content from www.sun.com, and deliver it with a look and feel that is consistent with this site.
If this configuration is not enabled, those same links are left alone, and clicking on them will send the browser directly to the relevant site on www.sun.com.
Notice the page is a combination of ordinary HTML, along with additional tags that are interpreted by the server, and replaced with ordinary HTML.
In some places, the formatting and indentation of the template is a bit bazaar. This is due to tip-toeing around many differences in layout policy we've discovered while attempting to make this site look right on a wide variety of browsers and operating systems.
Changing the site look is simply a matter of changing the site template.
As is typical in Brazil system implementations, the HTML form tag has no action attribute; the form is submitted back to the same URL it was retrieved from. This allows the form data and the form processing to be kept in the same place.
<server language=tcl> ... </server>
Rather than emmiting HTML using the "print" statements in our scripting language, we extract, compute, and provide variables into the server environment that are then interpreted using the XML constructs in the rest of the page.
Using this technique, we can separate the "logic" from the "look".
Running the server then consists of choosing an appropriate Java VM, and the desired set of configuration files.
|
This page is: http://www.experimentalstuff.com/About_this_site/index.html Last Modified: Thu, 30 Jun 2005 04:44:23 GMT copyright (c) 2000-2007, Sun Microsystems |