April 3, 2004
Dorothy Lam
Adam Bedrossian
Chintan Patel
Wenchao Chen
Joel Collins
Rohit Reddy
TerpWord Manual
About TerpWord
TerpWord is an application for text processing. It stores documents as HTML files in combination with Cascading Style Sheets (CSS) . The application combines text processing features as known from popular word processors with a simple and generic way to store textual information and styles. TerpWord is not intended to be used as an editor for web pages in the first place (although it can be used for this purpose with some limitations too). Especially HTML and CSS produced by other applications might or might not work with TerpWord, as other applications as well have trouble with content not produced by themselves.
The TerpWord Project
The TerpWord project was started to build an application with above features and to document, how this can be done. This is approached by building TerpWord in several stages and by documenting all stages thoroughly. Each stage is covering certain functionality making it easier to concentrate on some of the many details such an application is made of. Stages are described in this tutorial, which as well serves as online help. Source codes are documented with Javadoc in addition.
Open Source
All source code is openly available along with the application and can be used to find out, how the application is working. Among serving for above functions, TerpWord shall be an example for developers intending to build applications with similar functionality. As well it can serve as basis for other applications.
Documentation
Sources are documented by Javadoc comments, which are compiled to an API documents collection with Javadoc .
The project and application is documented with this tutorial. The tutorial covers general information about the project and the application, information about installation and requirements , the internal structure and functions of TerpWord and finally its usage
.
The tutorial can be used as online help for TerpWord as well as for reading about how is built. It is available in formats plain HTML, JavaHelp and PDF. The tutorial was built with application HelpExpert entirely.
Application HelpExpert is available at http://www.calcom.de/eng/product/hlpex.htm
Getting started
Alright, you somehow found this tutorial, made it through lots of preliminary information about TerpWord and finally like to use it somehow. Thank you! And here is how it works:
find out, if you meet the requirements
make sure, download and installation is complete (yes, you have to do it without fancy installers, but hey, relax: it is simple, even I can do it...)
and off you go by starting the application Seriously you should at least be familiar with this part of the documentation before you try to use TerpWord.
Requirements
Java
To run TerpWord, a Java 2 Standard Editition (J2SE) Runtime Environment (JRE) of version 1.4 or higher is necessary. To work with the source code, a Software Development Kit (SDK) for J2SE version 1.4 or higher is required.
J2SE JRE and SDK are available at no charge at
http://java.sun.com/j2se/1.4
JavaHelp
For using this tutorial as online help from out of the application, the JavaHelp runtime extension is needed. The JavaHelp runtime extension is distributed with the TerpWord package (file ' jhall.jar '). To learn more about JavaHelp and for access to sources and API documentation of JavaHelp, please visit
http://java.sun.com/products/javahelp
Java Web Start
To install and run TerpWord directly from its home page the Java Web Start extension is needed. Java Web Start is installed together with the JRE (see above) automatically. To learn more about Java Web Start technology and for access to sources and API documentation, please visit
http://java.sun.com/products/javawebstart
Installation
Java Web Start
No installatiofn is necessary with Java Web Start, just go on to ' Starting TerpWord ' when using Java Web Start
.
Traditional installation
Once downloaded the TerpWord distribution package zip file
create an arbitrary folder such as C:\Programs\TerpWord
extract all contents of the downloaded zip file into that folder
Starting TerpWord
Java Web Start
The simplest way to run TerpWord is to press button 'Web Start Me Now' at
http://www.lightdev.com/dev/sh.htm . Alternately, direct your browser to
http://www.lightdev.com/shtm.jnlp to achieve the same.
No file copying, no link or path settings, just one click.
Traditional start
To run the executable JAR file without Java Web Start, use the following command on the command line prompt of your system (replace \ by / and omit .exe on Unix or Linux systems) [JRE]\bin\java.exe -jar [AppDir]\TerpWord.jar [AppDir] in above command means the directory, you have installed TerpWord on your computer.
[JRE] means the directory, the Java 2 Sandard Edition (J2SE) Runtime Environment
(JRE) is stored on your computer.
Note
: All paths should not contain blanks. A path such as
C:\Program Files\TerpWord as the <AppDir> will only work if it is put in quotes, such as in " C:\ProgramFiles\TerpWord\TerpWord.jar "
Example 1 (Windows)
If your JRE is in directory
c:\programs\java\j2re1.4.0_01 and TerpWord is in directory c:\programs\TerpWord\ the command to start TerpWord would be
c:\programs\java\j2re1.4.0_01\bin\java.exe -jar
c:\programs\TerpWord\TerpWord.jar
Example 2 (Linux)
On Linux your JRE might be on
/usr/lib/java2/j2re1.4.0_01
and TerpWord might be in
/opt/TerpWord
then the command to run TerpWord would be
/usr/lib/java2/j2re1.4.0_01/bin/java -jar /opt/TerpWord/TerpWord.jar
Inside TerpWord
This section explains the way application TerpWord is built, its structure, design and internal functionality. Refer to section ' Using TerpWord ' to read about its usage.
Stages sections
TerpWord is built in stages. By dividing development into pieces, it is easier to concentrate on a certain detail of the application, paying more attention to the particular design of this part. The application will be more modular making maintenance easier to achieve.
Each stage results in a complete application. The resulting application gets more complex with every stage added while retaining its modular design. This section has chapters directly corresponding to each stage of TerpWord.
Source codes
A complete set of source codes is distributed together with this tutorial for each stage.
For stage 2 for instance there is a complete set of sources chapter 'Stage 2' refers to. This set of sources contains all sources of stage 1 and 2 making up one executable which - when compiled - represents stage 2 of the application.
In essence, sources of stage 2 do not contain changes versus stage 1 only, they represent a complete application stage inlcuding previous stages.
Spotlights section
The spotlights section discusses certain topics from a process oriented point of view. Where the stages sections explain the parts of TerpWord in the way they are structured (by classes and methods), spotlight topics wrap several parts of the application together to explain one process.
How to use this part of the documentation
This part of the tutorial should be used together with the source codes which have plenty of documentation in addition. Source codes are commented and most of the comments went into the API documentation accompanying the package. Additional (non Javadoc) comments make clear certain parts of code on top of that.
This tutorial does not repeat code. It is structured to lead the way into the very details of the application's source code by adressing certain topics in one block. Chapters usually refer to the source codes by naming certain fields or methods. It is recommended to open the source codes in parallel to reading this tutorial.
Target audience
Basics of Java and programming in general are not covered here, so interested readers should have a basic knowledge about these already. This section concentrates on discussing best practices and how to's in conjunction with a particular part of the application, trying to make a top