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

Full text FAQ editor features, 29th July 2006

Added new methods to the FAQ Question interface to get and set the primary and premium content answer text. Also to get an Iterator of subject terms for a question, set the subject terms as a comma separated list and check whether the question includes a given subject term. Added statements to set the primary and premium answers in Question objects and assign subject terms from the database. These features will ultimately enable full management of FAQ content from the database.

Updated FaqQuestion to implement the new interface methods and switched to a BoxLayout for the input fields. Created a new LabelledListField for question subject terms. This extends LabelledTextField with additional methods to get an Iterator of subject terms and check whether the input field contains a given string.

Added a JScrollPane to LabelledTextArea and applied an inset border to it. Changed the AbstractFaqNode constructor to take a generic LayoutManager to pass to the superclass and added a default constructor.

Created a test application, LogEditor, to check layout of labelled input classes. Extracted the anonymous WindowListener from FaqDataEditor and created a general purpose WindowClosingListener. Also removed debugging output.

Technorati tags: , , .

FAQ help request policy, 24th July

Modified the confirmation message for FAQ help requests to clarify the policy. Requests must qualify as asking the right question and will be answered as time permits.

Technorati tags: , .

XML-RPC ping application, 22nd July 2006

Added setTitle(String), setSourceUrl(String) and setFeedUrl(String) methods to the PingManager class, so that it can be adapted for use in a new Swing PingApplication. The PingApplication has three input fields to match the main parameters of the PingManager. At start-up, it loads a property file containing the ping services configuration for the PingManager. The Ping button starts an iteration through all the ping services and the status and response content is displayed in a TextArea beneath. The input fields need some adjustment.

XML-RPC ping application, 22 July 2006

Altered LabelledTextField to add some border padding to the label and text field via a CompoundBorder. The margin border is a MatteBorder instance with extra inset and the same colour as the original component.

Re-structured the try/catch block in the XmlRpcPing class for the case of a bad response from the ping service. If the request for the error response content throws an exception it is ignored and any status code is returned.

Created a new Appender interface to adapt status information from PingManager to different outputs. Appender has two append methods for String or int, plus a toString() and reset() method. Created a BufferAppender implementation with an underlying StringBuffer, and an AWT TextAreaAppender for use in the new PingApplication interface.

Technorati tags: , , , .

New wide text ad style, 18th July 2006

Adjusted CSWideImport.css stylesheet rule for the .TextAd selector to float right with 12% width. Added a clear: right declaration to the .FontImage selector rule.

.TextAd {
  float:            right;
  width:            12%;
}
      

Updated the FontSampler classes to include the new text ad markup through a new getTextAd() method in AbstractSample. ImageSample and TextSample subclasses include the text ad in their getContent method.

Also added layout and livery styles for paragraphs in field sets and legend elements, which are styled like other headings.

Updated the site statistics page for 2005.

Technorati tags: , .

Nested ordered list style correction, 17th July 2006

Found and corrected the case where an ordered list is included under an un-ordered list. This was inheriting the style of the parent un-ordered list, so added a more specific rule to give the ordered list decimal numbering.

ul {
  list-style:       url(/images/bull-12px039.gif) disc;
}
ul ol {
  list-style:       decimal;
}
      

Standardised right hand sub-section navigation for the Cursive font sampler, Fantasy font sampler and Monospace font sampler

Technorati tags: , .

Feed conversion pattern emulation, 15th July 2006

Extended the draft HtmlContentHandler class to process HTML source pages in basic mode and TOC mode equivalent to the XHTMLtoRSS XSLT. Standard SAX event handlers are used to populate a Channel instance.

Adapted the master HtmlContentParser class to take a feed URI argument in its constructor, which is passed into the HtmlContentHandler when the source is parsed. Extended unit tests for all new features.

Created a UriResolver class to hold the primary source URL of a source page and resolve relative hyperlink references from it. The main getUri(String) method is supported by public getBaseDirectory(), getUrlPath(String) and getParentDirectory(String) methods that break-down the task, with private methods getAbsolutePath(String, String), isAbsoluteUrl(String) and getDomainUri(String). Created a unit test to check basic operations.

Adapted the FeedChannel class to track whether a feed has any items and to specify a feed URL. Renamed Item methods to getDescription() and setDescription(String), rather than "summary".

Technorati tags: , , .

Premium content login guide, 11th July 2006

Added new illustrations of the premium content log in process and new FAQ to answer the question How do I log in to the premium content area?. Updated styling to put a solid 1px #CCC border around the illustrations.

Site help

Technorati tags: , .

New HTML parser test structure, 10th July 2006

Added a test source directory reference to the Ant local and remote properties files and property setting to the standard test target. Also added an XML Unit test target to the Ant build and the JAR to the classpath.Created a basic HtmlContentParserTest suite and simple HtmlFileFilter to support the tests.

Technorati tags: , .

Feed downloader and HTML parser corrections, 8th July 2006

Added a URLEncoder encode call to the getFilePath method of FeedDownloader to convert problem characters in URLs to legitimate file names. Added a URLDecoder decode calls to pre-process encoded URL input strings. Amended the getUrlPath method to truncate any additional parameters after the source URL. Also corrected a hard coded reference to the Code Style base URL in the processFeedUrls method. Updated the user agent string for the downloader and the target data with the month's service URLs from Metacentric and downloaded the full data set for testing.

Found a confusing bug with the working draft HtmlContentParser class, which was not getting basic title element content back from the TitleElementHandler class. Created a basic HtmlContentParserTest suite and TitleElementHandlerTest to check basic functions in isolation, but could not find the origin of the problem when the title was parsed through the HtmlContentParser. Stripped HtmlContentParser down to its basic configuration and started building a more detailed suite of tests for the fundamental features of the system. The test suite uses XHTML source acquired with the new FeedDownloader class and formerly tested manually.

Moved all Code Style and Metacentric source files to the xhtml test folder to distinguish from html tag soup. Created a new txt test folder and moved ANSI, Unicode and UTF-8 test files there (could not find any test cases that refer to them).

Created a simple HtmlFileFilter to support the new HtmlContentParser tests. Added JavaDoc index pages for the org.codestyle.feed and sax.html packages.

Technorati tags: , , , .

Ping response tweak, 4th July 2006

Added line feeds to the PingManager console output to distinguish responses from each ping service. Created a launch script for the PingManager class that passes the three key parameters: feed name, source URL and feed URL. Tested with all currently configured ping services.

Feedster does not support XML RPC ping requests. NewsIsFree have withdrawn their ping service because of spam.

Technorati tags: , , , .

Extended ping method support, 1st July 2006

Created a new PingService interface and single concrete XmlRpcPingService class to simplify the handling of ping requests. The XmlRpcPingService class takes the service URL and an extended ping method support argument in its constructor. Re-named the AbstractXmlRpcPing to make a single XmlRpcPing class that is configured with a different PingService instance for each request. Discarded the former Syndic8Ping, TechnoratiPing and TestXmlRpcPing subclasses, which were superfluous.

Renamed Ping interface methods to setSourceUrl(String) and getSourceUrl() and introduced setPingServiceUrl(String) and getPingServiceUrl() methods to AbstractPing.

Added more detailed ping response reporting to the XmlRpcPing class by storing the HTTP headers and message body. Debugged connection and output handling with the local XmlRpcEchoServlet and then tested against series of public services. Had to configure extended ping support by trial and error, since few services have detailed specifications or very helpful error responses, as below.

Several services gave HTTP 403 errors, required registration or cryptic RPC method error messages and will require more detailed debugging.

Technorati tags: , , extendedPing .

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