SCIPIO ERP relies on a presentation layer to generate visible results. The layer itself is context-independent and uses a set of view-handlers for the various forms of output. Though this may sound a bit complicated at first, the process is actually rather simple: Once a request is recognized, the presentation layer will process the result and lookup what type of output is desired. You can choose from PDF, HTML, JSON or CSV files inside of your own definitions.

There is no magic involved here. On a more technical level, all of this is realised by:

  1. Web.xml loads control-servlet (mapped to /control/)
  2. The Control-Servlet (Controller) intercepts the request
  3. The Request definition (controller.xml inside each component) is processed
    1. Pre- & Post-Processors events triggered
    2. Request processed
    3. Security checks are applied
    4. Events or services run
    5. Response evaluated (view-map vs. redirect/forward)
    6. Specific view-handlers handle the response output (Java classes that convert the output into the right format)

Most of the view-handlers use freemarker macros to generate the desired output. Our own templating toolkit largely builds on this. Each output begins with a request that is intercepted by the components control-servlet. The servlet will look up the definition, inside the component’s controller definition. The control-servlet itself is loaded by the web.xml on application load.