Skip to content
davidmoreno edited this page May 9, 2011 · 2 revisions

libonion is structured to allow the user to create the web application based on layers.

Onion analogy

Some frameworks create url lists to use, and allows some kind of layering (setting one part of the program inside one path). For libonion developers this is the base. You create some handlers that you later layer.

The first layer, the skin, should be, if necessary the virtual host control. Then check the directories as needed. Maybe on one moment you need a security layer; nothing without a given property may pass, and later more directories and finally the real processor.

This layered structure gives the name to the library.

Also the handlers are called in order and they decide if they should process the petition, pass it to the next handler on this layer, or if appropriate pass it to its inside layer.

Each handler may have its own private data. Related to the private data some function to release this data should be passed.

Clone this wiki locally