Introduction#

makumba's controller is using the filter pattern. All JSP, JSPX (source view) files, as well as the /mak-tools URIs are processed by this filter. Internally, the org.makumba.controller.http.ControllerFilter is invoking a chain of org.makumba.commons.ControllerHandler implementations. These are (in order of invocation):

ControllerHandlerDescription
org.makumba.controller.AJAXDataControllerHandlerHandles partial page rendering and partial form post-back. In case of an AJAX request, will replace the response with a JSON string containing the necessary data
org.makumba.devel.SourceViewControllerHandlerDisplays the source of a JSP page (if invoked with JSPX)
org.makumba.devel.DataToolsControllerHandlerRenders the view for makumba data tools, part of the developer tools
org.makumba.commons.MakumbaToolsControllerHandlerRenders the view for the makumba tools
org.makumba.devel.ErrorControllerHandlerError handling. Processes the response and renders a human-readable error, enriched with information useful to the programmer
org.makumba.analyser.AnalysisInitControllerHandlerInitialises page analysis
org.makumba.controller.FilterConditionControllerHandlerChecks whether the request should be filtered further
org.makumba.controller.CharsetControllerHandlerApplies the UTF-8 charset to the resulting response
org.makumba.commons.attributes.DatabaseConnectionControllerHandlerInitialises one connection from the connection pool for the request, and closes it on response
org.makumba.commons.attributes.AttributesControllerHandlerInitialises makumba attributes
org.makumba.forms.responder.ResponseControllerHandlerResponds to the request, mainly by invoking the business logic, the form validation and the form response

Depending on the different ControllerHandler outcomes, the chain gets executed until the end, or may return before (e.g. if the FilterConditionControllerHandler judges that a request should not get filtered any further, it won't get filtered any more in the chain).

Some ControllerHandlers (such as the SourceViewControllerHandler and the DataToolsControllerHandler) are in fact servlets in disguise. The advantage to implement them as ControllerHandlers is that they do not need to be explicitely mapped in the web.xml, which simplifies the boilerplate configuration for makumba. The Servlet standard 3.0 may however address this issue.


Add Comment
« This page was last updated on May 16 2010