Codestructure, first few lines
[mir.git] / doc / CODESTRUCTURE
1 -------------------------------------------------------------------------------------
2
3 A short intro to the code-structure of Mir
4
5 -------------------------------------------------------------------------------------
6
7 In the java-source tree you will find the following:
8
9  - two classes (OpenMir and Mir)
10  - two packages (mir and mircoders)
11
12
13 Servlets:
14 -------------------------------------------------------------------------------------
15
16 Looking from the request of a client browser onto MIR, the http-request is passed
17 via Apache/Tomcat to either Mir.class or OpenMir.class. Mir.class handles all 
18 request that deal with internal administration tasks of MIR. OpenMir is the
19 Servlet that deals with all open tasks: adding comments or articles/media to
20 the system.
21
22 These servlets don't do much but dispatching the tasks to an underlying code
23 level, called ServletModules. OpenMir.class is basically a special case of Mir.class,
24 no authentication is needed, and only two underlying ServletModule are used.
25
26 The following explanation is about how requests are passed through, and responses
27 to the client-browser are generated. The request has to pass through up to four
28 levels of code (and from there asking the database), until it collected all the
29 necessary data or performed all necessary tasks, to be able to respond.
30
31
32 ServletModules:
33 -------------------------------------------------------------------------------------
34
35
36 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....
37
38
39 Modules:
40 -------------------------------------------------------------------------------------
41
42
43 Database/Entity:
44 -------------------------------------------------------------------------------------
45
46
47 ----------- old german stuff ........................................................
48 1. Database / Entity Klassen
49
50 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.
51
52 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.
53 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.