In this section

Site navigation below

The Code Style site has evolved by gradual refinement and accumulation of features and content. This review is part of a fully backdated site log and archive that sheds light on when, why and how particular features were implemented.

This log is sometimes updated several times per week, sometimes with a long overdue backlog of items. Many log entries refer to the Code Style Java package that delivers the servlet services and utilities used to manage this site.

Subscribe to the news feed for this log: RSS news feed

Reverse chronology

31th August 2003

Created a new top level Broker interface with single declaration, long getLastModified, and sub-interface StreamBroker with openInputStream and openOutputStream methods. Changed the class declaration for FileBroker to implement StreamBroker via FileContentRequest.

Also created a new abstract CacheValue class that implements StreamBroker to permit different forms of physical cache storage. Renamed and re-worked the former ResultValue as org.codestyle.broker.FileCacheValue to operate as a CacheValue type. Removed the unchecked SecurityException if the cached file cannot be deleted.

Renamed and repackaged the former ResultCache and ResultKey classes in the org.codestyle.broker package as a generic Cache and CacheKey classes. In principle, these can be used to cache network resources as well as XSLT results.

Made a range of further standardisation changes to the Code Style Java project using Check Style. Commented out failing tests then re-instated them one by one to contain the task.

Also made various other changes in the course of editing:

Changed the class hierarchy of ReportingParseException to extend SAXException, rather than Exception, and changed the static formatMessage method to an instance method to override getMessage. This method now formats the enclosed SAXParseException fields on output rather than at instantiation.

30th August 2003

Installed Check Style and adapted a configuration file based on the Sun code conventions to run across the Code Style Java project. Identified a range of issues and started to bring up to standard in stages.

Also applied various other code changes in the course of editing:

24th August 2003

Changed the transform method of the ParseHandler object to take an OutputStream argument instead of an HttpServletResponse, so that client servlets can be adapted to simultaneously channel XSLT results to a ResultCache via ForkedOutputStream. Adapted the abstract ParseServlet to pass a ServletOutputStream to the new method signature while the ResultCache is under development. Also adapted the JUnit ParseHandlerTest and ParseRDFNetworkTest to use new OutputStream arguments.

Added an HTTP POST method test form to the servlet test cases document.

23rd August 2003

Implemented a delete method for ResultValue to delete cached XSLT result files and adapted the ResultCache's flushAll method accordingly.

Created a new ForkedOutputStream class based on TeeOutputStream in Java I/O by Elliotte Rusty Harold. This dual output stream will ultimately be used to channel XSLT results to servlet output and a result cache.

Removed the UTF-8 declaration from the private String array in SourceType class, so that this is applied by the ParseServlet, see 10th August corrections.

10th August 2003

Added a global cache location to the servlet zone configuration to implement XSLT result caching. Also added this cache configuration to the project build file, properties, filters files and JUnit test cases for the abstract ParseServlet and concrete ParseRSS and ParseRDF servlets, though actual caching is not implemented yet. Improved configuration error reporting to identify specific initialisation parameters.

Wrote a first draft implementation of a ResultCache class to save the results of XSLT transformations. The cache uses a Map of ResultKey and ResultValue pairs to uniquely identify the transformations and their results. The ParseHandler object for a transformation encapsulates its unique properties and is used to construct the ResultKey, the ResultValue implements a File-based registry and interface to the physical storage of the cache. The ResultValue should ultimately be abstracted to permit alternate forms of physical storage through the org.codestyle.broker package.

Introduced a StreamCopier class to the org.codestyle.io package adapted from StreamCopier in Java I/O by Elliotte Rusty Harold. The static copy method channels an InputStream to an OutputStream via a buffer and is used by the new ResultValue class to read and write file content.

Corrected failing network tests for the HTTP Content-Type property of the ParseRDF and ParseRSS servlets and SourceType object from which they are derived. The addition of the character encoding for UTF-8 on 14th June resulted in a string comparison error. Altered the abstract ParseServlet and SourceType classes to separate the type from its encoding and post-appended the UTF-8 declaration. Adjusted servlet implementations and test cases to use the string indexOf method to confirm appropriate content types in ParseServletNetworkTest, ParseRDFNetworkTest and ParseRSSNetworkTest. Also corrected URLs for several network test case documents.

Added the Googlebot agent to the site robots.txt file to restrict access to the FontSampler and ViewSource servlets.

9th August 2003

Added an AnchorPoints link to Using XHTML / CSS for an effective SEO Campaign by Brandon Olejniczak to the foot of the Code Style Search engine optimisation article.

Previously on Code Style

These backdated pages record detailed changes to the Code Style Web site since July 2000, when development first got underway. Some pages may refer to documents or features that have since changed or are no longer part of the site, but the archive is checked to ensure there are no dead links.

Add this page to your chosen social bookmarking service

Style warning - please read

Home · CSS · Java · Javascript · HTML · Help · Log