------------------------------------------------------------------------------------- A short intro to the code-structure of Mir ------------------------------------------------------------------------------------- In the java-source tree you will find the following: - two classes (OpenMir and Mir) - two packages (mir and mircoders) Servlets: ------------------------------------------------------------------------------------- Looking from the request of a client browser onto MIR, the http-request is passed via Apache/Tomcat to either Mir.class or OpenMir.class. Mir.class handles all request that deal with internal administration tasks of MIR. OpenMir is the Servlet that deals with all open tasks: adding comments or articles/media to the system. These servlets don't do much but dispatching the tasks to an underlying code level, called ServletModules. OpenMir.class is basically a special case of Mir.class, no authentication is needed, and only two underlying ServletModule are used. The following explanation is about how requests are passed through, and responses to the client-browser are generated. The request has to pass through up to four levels of code (and from there asking the database), until it collected all the necessary data or performed all necessary tasks, to be able to respond. ServletModules: ------------------------------------------------------------------------------------- Die ServletModule Klassen implementieren bislang die einzige Zugriffsschicht nach aussen. Vorstellbar waeren auch Applikationen und Applets, ueber die das Produktionssystem steuerbar waere, oder java-Standaloneprogramme, die bspw. einen Datenbankimport machen.... Modules: ------------------------------------------------------------------------------------- Database/Entity: ------------------------------------------------------------------------------------- ----------- old german stuff ........................................................ 1. Database / Entity Klassen Die zugrundeliegende Speicherungsschicht wird von den StorageObjekten realisiert. StorageObjekt ist eine generische Klasse, die zur Zeit nur als Datenbankablage realisiert ist. Es waere jedoch mehr oder weniger einfach auch eine Ablage im Filesystem zu implementieren, womit offline-Arbeit mit dem Produktionssystem denkbar waere. Die Databaseklassen sind als Singletons (es gibt fuer jede Tabelle nur ein Database-Objekt) implementiert und kuemmern sich um den Zugriff auf eine Tabelle in der Datenbank. Wird von der Database-Klasse eine Zeile aus der Datenbank ausgelesen, so wird die Zeile als entsprechendes Entity-Objekt repraesentiert. Eine Entity ist also die Objektversion einer Datenbankzeile.