I don't care what I said, you know what I meant
--SportPage should not require an undergraduate computer science degree to deploy the technology. Unfortunately, because of the fuzzy boundary between Velocity and the Java programming language, there are a few techno terms that creep into this document. The following list explains a few of the more esoteric items, for others, it's probably a good idea to ask Google.
SportPage is based on the Velocity template engine, a multithreaded template system for merging dynamics information with a static layout. For details on the syntax of Velocity, read the Velocity User Guide at the Apache website.
Universal Resource Indicator, or the path part of a URL. For example, in the URL http://cbc.ca/olympics/sports/hockey, the URI is the section after the host name, /olympics/sports/hockey. SportPage is fundamentally tied to the URI as defining the page path and topic.
In the context of SportPage, the topic and the URI are the same thing; a web page path is computed by removing the webapp path, and the topic by replacing internal path slash characters with periods. In the above definition for URI, the webapp is the /olympics portion, the path would become /sports/hockey and the equivalent topic would be sports.hockey
This is a legacy term from the old CBC News system where the “template” meant the form used by journalists to enter news items; the term became widely adopted to mean “CBC-generated news items for the website”. In the context of SportPage, the $weather and $news javabeans are called “template” objects because their data has its origins in the News Template system. Where possible, this document will differential these from Velocity templates by explicit qualifiers.
The SportPage PageHandler interface defines an API for java classes mapped to specific URI paths that process all URIs under that path. Page handlers are invoked to do the context setup for these pages and are able to change any context values prior to the template being processed. To be located by the loader, new page handlers must be in the ca.cbc.sportwire.servlet.pagehandler.
In the most general sense, a “Java Bean” is a java object with a null constructor and a standard convention for access to object attributes. For Velocity, a Java bean must have a null constructor, access methods and provide all list and lookup methods as List and Map classes; third-party Java objects returning other list and map types will need to be wrapped in another class. For an example of a class wrapper, see the VelocityCalendar source code.
Java Document Object Model is a simplified form of the W3C Document Object Model specification. Don't ask what the latter is, just be happy that access to the former type of objects is so simple. See the example templates (Example 1) in this document for access methods. For more information on JDOM, see the JDOM Project Page.