------------------------------------------------------------------------------------- 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: ------------------------------------------------------------------------------------- The ServletModules are called via reflection java-api. The http-request parameter "module=XXX" and "do=YYY" are evaluated. A method YYY(HttpRequest,HttpResponse) is called in ServletModuleXXX. Modules: ------------------------------------------------------------------------------------- Database/Entity: ------------------------------------------------------------------------------------- - db: singeltons, object-representation of db-table, access, generating entities - entity: representation of row Producer -------------------------------------------------------------------------------------