Tékumel Java/XML Project
In order to learn XML, Java Servlets, and JSP, I've embarked on a substantial project. I’m placing my notes here as a demostration and as a resource for those who want to write applications to interface with it.
The final goal is an application to create data for characters in the Tékumel roleplaying game, and store them in a web-enabled database.
This application is a three-tier architecture consisting of a web-enabled database with Java servlets to accept and retrieve character data, a set of middleware objects to perform operations to create this data,and two client applications to interact with the user through character design. One of those clients will be written in Java and Swing as a standalone application. The other will be a JSP website to perform the same task. XML will be used as the data interchange format between the client and the data server.
Data Access Layer
For the database, Xindice, a native XML database (NXD), was chosen to avoid translating XML documents into SQL tables. Xindice is an open-source NXD available from the Apache Project (xml.apache.org). On top of this database will be a set of Java servlets to store XML documents from the web, and search for and retrieve XML documents from the database.
Business Logic Layer
A set of Java Beans will be created to manipulate XML and generate the character data. These entities will do most of the work of character generation. They will encapsulate the game rules needed to create roleplaying game characters.
The first application is a standalone Java/Swing application. This program will display and control the character generation process, generate TekML, and send it to the Xindice servlets. An advanced search function will allow the client to display characters stored in the web database.
In addition, a JSP web application will be developed that duplicates the function of the Java/Swing application.
An XML format called TekML has been developed to store and transfer character data from the client applications to the database. TekML will be able to handle several game systems, since many systems have been used in the past for Tékumel roleplaying.
- The first step in this process is to create TekML, the XML format for the character data. To that end, I have an XSD, and a sample XMLfile.
- The next step is to install and configure the XindiceXML database to accept TekML data. Installation is complete.
- Servlets to pass TekML documents to and from the Xindice database been completed.
- JSP web pages have been written to retrieve and view existing characters from the Xindice database.
- I previously wrote another character generator for Gardasiyal, one of several game systems used for roleplaying tekumel. The character generator logic will be incorporated into the Java Beans. The GUI of this program will be the prototype for the user interface of the new program.
To Be Completed
Then, the existing application will be gutted ofcharacter generation logic that will be put into Java Beans.
Build the JSP character creation application.
Complete the Swing interface.
This web page will be updated with the progress of the project.