XML technologies / XSLT / Java and XSLT / Discussion forum / Development process

(Excerpt from “Java und XSLT” by Eric M. Burke)

Developing a Java and XSLT web application can be divided into steps. As in any software project, a modular approach lets different programmers share the work, accelerating development and involving people with different skills.

The steps are:

This roughly reflects the order of work, but larger applications often start with a rudimentary complete system implementing a few key features and requiring every step above. Repeat the process for later features. Even smaller projects typically develop iteratively rather than in one pass.

The chapter’s final part implements the discussion forum. Requirements, design and code follow roughly the list’s order.

Requirements

Develop an online discussion forum with Java and XSLT. Every reference-implementation feature is accessible through a browser and XHTML, without client-side Java or JavaScript. Hosting requires Java 2, Servlet 2.2 and a relational database such as MySQL. We assume extra JARs, such as those for JAXP and JDOM, can be installed with the application.

The forum is divided into message boards for topics such as dog lovers or cat lovers. Each message belongs to a board and may reply to an earlier message. This is a threaded discussion forum. Each message has a subject, date, sender email address and body.

Visitors can read, post and reply. Only administrators create boards. The reference implementation uses XHTML but prepares for alternatives such as XHTML Basic or WML. Apart from practical bandwidth and database limits, there are no artificial limits on board or message counts.

To keep the example manageable, it omits web administration, user authentication and security, and archive search. Implementation suggestions appear at the chapter’s end.

Information flow

The forum interface has four screens, shown below. Boxes represent pages and connecting lines their transitions, corresponding to page links.

Forum web pages

Figure: Forum web pages

This graphical layout of page interactions is called storyboarding. Originating in animation and film, this interface-design technique often starts as paper sketches capturing general information flow. It is a good starting point, showing component interactions without technical detail.

The entry page, “Diskussionsforum Home”, lists boards and months for each board. Selecting a month lists its message subjects. Another link posts a new message. Every page links back to the home page.

“Monatsübersicht” lists a board’s message subjects for one month as a tree, displaying subject, author and date. Replies are indented below their original messages to show threads. Users can view a message or open “Neue Nachricht abschicken”.

“Nachrichtenansicht” displays all details of a message, with links back to the month overview or to compose a reply.

The final page composes a new message or reply. Their similarity permits substantial Java and XSLT reuse. Sharing code reduces size but increases complexity because it must support several operating modes.

   

 

 

 

back to top