juniverse.org JOrganizer
Home
Quickstart (Screenshots)
Documentation
Resources
Download
Tools
Bugs/Wishlist


SourceForge.net Logo
An overview of the architecture of the JOrganizer
Programming language and used API's
JOrganizer is a javabased application which needs a installed JDK( now also called J2SDK), version 1.3 or abouth. It uses the Java Servlet and JSP API's, so a Servlet- and JSP-Container must be installed to use JOrganizer. Until now, JOrganizer is only tested with the Jakarta Tomcat Servlet-Container under Windows XP and 2000.

JOrganizer is build on the following API's and framework's:
API/Frameworks Version Used in modul/Classes:
Jakarta Struts 1.1 b2 all modul's
Castor 0.9x org.juniverse.jorganizer.database.CastorDatabase
Struts enhancements
Struts offers a number of framework components, that can be used to build an application. Two of this components are not used directely. They are enhanced to integrate special feature's, that are used by the JOrganizer:

The ActionServlet is enhanced by org.juniverse.jorganizer.JOrganizerActionServlet. In it's init() method the JOrganizer.properties ResourceBundle is loaded and the CastorDatabase is created. Both objects are added to the servlet context.

The Action class of Struts is enhanced by org.juniverse.jorganizer.AbstractJOrganizerAction. All Action's in the JOrganizer are derevided from the AbstractJOrganizerAction. Therefor they are not implementing the execute() method. They implement executeAction(). The execute() method, which is called by the Struts framework, check's if the user is logged in. If not, it forwards the request to the login page. If the user is logged in, it call's the executeAction() method.
The Castor Database
All database access is handled by the org.juniverse.jorganizer.database.CastorDatabase. An instance of this class is created by the JOrganizerActionServlet and is placed in the servlet context, so all Actions have access to it.

The class uses the Castor JDO framework. The configuration of JDO is handled by two XML files, that are placed in the org.juniverse.jorganizer folder:

database.xml - this file configurates the database which will be used, the JDBC driver and the user that should connect to the database.

mapping.xml - in this file the mapping of database tables to Java objects is specified. If you like to use other table or field names than the ones specified in the create_tables.sql you can change them in this file.

Today JOrganizer doesn't follow the best practise: It uses the Struts ActionForms as model and map's them direct to the database. This should be changed in the future. It is also not a good solution to have all method for database access in a single class and add any new method to the end of this class (which is alread about more than 1000 lines of code long!). Some kind of plugin API should be created. The database-plugins could be loaded in the init() method of the Servlet.
JSP's and program flow
Within the JOrganizer no JSP page is accessed directly (only the first login page login.jsp). A Action has to be placed before every JSP (even if it is doing nothing but forward). That is importent because in the Action will redirected every not logged in user to the login page.

JOrganizer uses the Tiles feature of the Struts framework. The Tiles parts are managed in the tiles-defs.xml file in the WEB-INF folder. The contant pages extend the mainLayout template (/templates/main.jsp). For every new JSP page used in the JOrganizer you need a new entry in the tiles-defs.xml file.
Differents between Web-Browser's
JOrganizer differs between Internet Explorer and other Web-Browser's. The IE frontend offers an Outlook like main navigation and an windows like sub-navigation. The none IE navigation is more simple and has an mouseOver effect if the browser supports this. The IE navigation is only used if the browser runs under Windows (not Mac!) and it's version is 5 or abouth.

In the org.juniverse.jorganizer.login.LoginAction (which is the first Action that is called) the type of the browser is detected by the org.juniverse.utils.BrowserDetector class (This class is "stolen" from Turbin and slidly modified). The type of the browser (EVIL_EMPIRE for IE, GOOD for others :-)) is stored in the session. In the frameset page this attribute is used to deside which navigation page (/templates/navigation_evil.jsp or /templates/navigation_good.jsp) should be displayed.

In the beginning (until version 0.0.18) only the IE was supported. Starting with version 0.0.19 JOrganizer is optimized for Gecko/Mozilla/Netscape 7 because this browser is availible on most plattforms, but continues to support the special IE navigation.
User interface
Hopefully the future will bring a new user interface. Today the interface is designed by me (Alexander Ilg). I'm more a developer then a web designer. I like the navigation (IE and other) and the list's and forms, but I don't like most of the icons.

The header graphic changes with every release. This will maybe stop if someone provides a good looking graphic. It should be easy to delivere multiple "skins" to the user (because of MVC).