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

Text ad service and big FAQ backlog, 30th September 2006

Created a Text ad service page to highlight advantages of hard coded links, with standard rates. Subsequently removed unit cost comparison columns from the rate table, which made it more complicated than necessary. Also used the virtually complete FaqDataEditor class to publish almost all outstanding FAQ questions, 31 in total.

CSS problems

JSP tags & libraries

Java API

Java I/O

Java Server Pages

Java command line

Java compiler

Java inheritance

Java interface design

Java objects

Java programming

Java servlet "how to"

Java servlet API

Java threads

Java utility classes

Javascript browser

Media style sheets

Servlet containers

Servlet exceptions

Servlet lifecycle

Site help

Site manager

Web fonts

Created a new set of persistent styles for the text ad rate table in the CSPersistent.css style sheet:

table.AdRates {
  clear:            none;
  padding:          0em;
}
table.AdRates caption {

  margin-bottom:    0.5em;
  padding-top:      0em;
  color:            #000;
  background:       #FFF;
}
table.AdRates .SubHeading,
table.AdRates th {
  border-bottom:    solid 1px #999;
}
table.AdRates th,
table.AdRates td {
  border-right:     solid 1px #999;
}
.EquivalentUnitCost,
.ActualUnitCost,
.Rate {
  border-bottom:    solid 1px #999;
}
.EquivalentUnitCost {
  color:            #000;
  background:       #EEE;
  text-align:       center;
}
.ActualUnitCost {
  color:            #000;
  background:       #FFC;
  text-align:       center;
}
.Rate {
  color:            #000;
  background:       #EEF;
  text-align:       center;
}
      

Added a link to the text ad page to the At a glance boxout menu.

Created an SQL script to add a separate boxout_url field to the FAQ section table for local navigation include file references. Added setter and getter methods to the Section interface and FaqSection implementation for the new boxout menu include file reference. Amended database load, update and insert methods to the new field in FaqDataEditor and FaqSection and updated FaqMenuGenerator to output the include files and insert the relevant references in the master files.

Added FTP put commands to the PSFTP update script to upload the new boxout menu include files. Doubled the size of the premium_answer FAQ database column to varchar(14000) for an exceptionally long answer.

New Java servlet API FAQ section, 26th September 2006

Created a new Java servlet API FAQ section by decanting an initial question set from the existing Java servlet FAQ pages. Corrected some FAQ entries for Mac OS fonts, JSP and Java sections. Also added a basic plain text output for newly issued questions to the FaqMenuGenerator class, to notify premium content subscribers by email.

Added standard at a glance navigation panel to the site RSS guide.

FAQ premium content generator, 23rd September 2006

Added methods to the FaqMenuGenerator class to output all the premium content question pages and added a filterTitle(String) method to strip HTML element markup out of questions used for titles. Refactored the document output from the printSections() method to create a general purpose printDocumentHeader() method for use with printPremiumContent() method. These changes enabled rapid deployment of 20 outstanding FAQ questions, listed below.

Apache Tomcat

JSP tags & libraries

Java I/O

Java abstract classes

Java compiler

Java objects

Java strings

Java threads

Java utility classes

Servlet containers

Servlet exceptions

Servlet threads

Site help

Web fonts

Changed the FaqDataEditor class so that it does not automatically prefix new questions' primary URL field with the path of the section. Introduced a DocumentMetadata class to carry title, description, created, issued and modified dates for the FaqMenuGenerator class.

FAQ title formatting, 21th September 2006

Adjusted the FaqMenuGenerator class to add the text "frequently asked questions" to the HTML title element and "FAQ" to the Dublin Core title meta element field and main page heading for FAQ sections. Also moved the <span class="Q">Q:</span> markup before the fragment anchor for answers and changed the "Most common questions" to an ordered list.

Removed the clear: both; rule from the .Q selector for FAQ questions in CSStdLayoutCommon.css, to remove gaps before the end of the right-hand navigation menu. Regenerated the full set of FAQ content and uploaded.

Created a new Java servlets contents page and head section include file.

Section update syntax correction, 20th September 2006

Corrected the SQL syntax for the FaqSection update, which was missing a comma from the list of field names. Added <span class="A">A:</span> markup to many FAQ answers that were missing it, and minor markup corrections to various other FAQ answers.

FAQ section generator, 16th September 2006

Added new queries and methods to the FaqMenuGenerator application to generate the main section index pages for all FAQs. A new printSections(File, Connection) method iterates through each section and generates an equivalent to the current index pages, with server side includes for various parts of the content. The printSectionContent(PrintStream, String, Connection) method inserts the question and answer content into the flow of the page with all necessary fragment anchors and premium content links. Copied content into the FAQ database from the current site help and Cascading Style Sheets FAQs to test.

Added getter and setter methods to the Section interface for a description and metadata server side include reference. Applied the change to the concrete FaqSection class with additional LabelledTextField rows in the user interface. Updated the FaqDataEditor application to load the description and metadata reference for sections at start up.

Changed the FaqQuestion doUpdate(Connection) and doInsert(Connection) methods to use a private reference to the primary and premium URL fields, rather than the public getPrimaryUrl() and getPremiumUrl() methods, which dynamically add the full path of the URL.

Clarified the wording of the AnchorPoints entry for the Font Bureau to clarify Matthew Carter's role in adapting the Big Caslon typeface. Corrected head section include references for Java servlet FAQ pages.

Tabbed panes for FAQ question editor, 15th September 2006

Set the FAQ question content in a set of JTabbedPane tabs; one each for primary question, premium question and metadata. Created a TitledTextArea for full width text input of FAQ answer content. Set the font for LabelledTextArea and TitledTextArea to 12 point monospaced and applied text wrapping.

area.setLineWrap(true);
area.setWrapStyleWord(true);
area.setFont(new Font("Monospaced", Font.PLAIN, 12));
      

Extra FAQ issued dates logged, 12th September 2006

Added a few remaining FAQs' issued dates to the database and generated include files for their origins. Corrected file path errors for the Java Server Pages FAQ.

New Java Server Pages FAQ section, 9th September 2006

Introduced a new Java Server Pages FAQ section by decanting questions from the original Java servlets FAQ and re-grouping them. Generated a fresh copy of the file set after recent changes to the structure of the FAQ categories, including re-organisation of some questions. New sections are automatically added to the "Questions answered" FAQ navigation menu, but manually added to the section menu.

Logged as many questions' date issued timestamp as could be located through the Code Style site log and generated a new set of server side include (SSI) files by issued date. Updated all relevant site log pages with the SSI lists in case the questions' classifications change in future. Also introduced an automatically generated "Very common questions" include for the main FAQ index. Now all question references are generated automatically.

Added new private static methods to FaqSection to get the next sort index for root sections and subsections as they are loaded to ensure each instance has a unique position in the SortedSet they are stored in. A minor kludge out of necessity. Removed the un-used getNextSortIndex() method from the FaqNode interface and its concrete instances.

Added the new Java FAQ sections to the site RSS guide listing: Java API and Java Server Pages.

Created a new Java servlets subsection TOC file and included it in the main Java section contents page. Also added the Java servlets subsection to site contents.

Added and tested the PostgreSQL driver pg74.216.jdbc2.jar, which fixes bugs found recently with the getTimestamp(String) method of ResultSet in postgresql-7.3.jar. Updated all PostgreSQL driver references to pg74.216.jdbc2.jar.

Added upload commands for the main FAQ section contents to the PSFTP batch script, previously omitted.

FAQ URL corrections, 7th September 2006

Corrected a number of hyperlink references to questions moved by FaqDataEditor by moving questions to their appropriate places. Some URLs need to be corrected in the database, hard coded site log references need to be updated by some other means. Added the new Java API FAQ to the FAQ section menu.

Added an HTTP protocol classification to site vocabulary and sub-terms for status codes, cache control and content type.

New Java API FAQ section, 5th September 2006

Updated all FAQ pages and menus via FaqDataEditor and FaqMenuGenerator applications. Introduced a new Java API section with new questions moved from other sections.

Altered the structure of the FaqQuestion class so that all parent Section references are handled via the immediate parent Category. Removed the separate Section reference from the constructor and FaqCategory newQuestion() factory method. Also changed the representation of primary and premium URLs in FaqQuestion so that fragment anchors are simply appended to the parent section's URL, rather than keeping a full copy of the path. This enables categories to be moved to a different section and for all their question's section references to be updated directly. Added an iteration through the questions to the moveCategory() method in the FaqDataEditor application to save such changes.

Corrected a PreparedStatement index reference in FaqSection that was preventing them from being saved.

FAQ node movement features, 4th September 2006

Created new wrapper classes for categories and selection objects that list their parent hierarchy for use in JComboBox lists. The toString() methods of CategorySelection and SectionSelection list each nodes names. Added move selectors and buttons to the FaqDataEditor Swing application to move questions and categories and delete each node type. These methods also move or remove the relevant nodes from the JTree model that represents the FAQ hierarchy.

Added methods to Section and Category interfaces to add and remove child types, and methods for Question and Category types to move the host object to a different parent node. Also added a delete(Connection) method to the Storable interface for SQL entity objects. Extended FaqSection, FaqCategory and FaqQuestion to the new interface methods.

Altered the FAQ database tables to convert question created and modified data types to TIMESTAMP rather than DATE and added a time_issued field. Also added metadata fields to the section table for time_created, time_issued, time_modified and subject_terms. Populated these fields with values from the current working versions of these pages and the Code Style subject vocabulary. Introduced a new top level vocabulary term, "Java", as a parent for "Java servlets" and "Servlet containers", and added cross-reference subject terms to individual questions.

Updated FaqQuestion with the new timestamp types and added metadata display and edit fields to the FaqSection class. When questions are modified, their parent section's modified date is also updated.

Added a setSortIndex(int) method to the Sortable interface and adapted the storage of AbstractFaqNode to use a LabelledIntegerField for its sort index. Also added a setValue(int) method to LabelledIntegerField and removed the getInt() method from the LabelledTextField superclass.

Added empty delete(Connection) methods to Subscriber and SubscriptionService classes to fulfil the Storable interface.

Found a StringIndexOutOfBoundsException "String index out of range: 26" in the getTimestamp(ResultSet) method of the PostgreSQL JDBC driver in pgjdbc2.jar. When there are millisecond values, the extraction method toTimestamp(ResultSet) goes out of range using the String.charAt(int) method. Temporarily updated all PostgreSQL JDBC driver references to postgresql-7.3.jar pending an update to the current driver JAR.

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