This is a short example of how to create your own Apache Chain Command and Context.
By extending the core interfaces you can easily create a complex compartimentalized application separating business logic in commands from the presentation logic necessary to display the results.
See the chain cookbook for more details on this example.