Package org.objectledge.web.mvc

The MVC web application model implemented in ObjectLedge.

See:
          Description

Class Summary
ExceptionRedirectorValve The valve that redirects to a configured view in case of exception.
MVCConstants A set of constant values used throughout MVC package.
MVCContext The web context contains all needed information about mvc processing parameters.
MVCInitializerValve Pipeline processing valve that initializes the MVC parameters (view and action) by means of the MVCContext object.
MVCResultsValve Pipeline component for putting the MVC view building results to the response.
 

Enum Summary
ProcessingStage  
 

Package org.objectledge.web.mvc Description

The MVC web application model implemented in ObjectLedge.

Model-View-Controller

The Model-View-Controller is an application building pattern which makes it easier for developers to separate application concerns - namely: presentation and businness logic. This separation is good for understanding and maintaining the code. MVC is already a quite old and mature concept, comes from Smalltalk developers and is extensively used in client GUI Java APIs like Swing and SWT. The web application frameworks have adapted this pattern and implemented it in many different ways providing different levels of flexibility.

The main idea of web application frameworks which support MVC pattern is to move away all the logic contained in presentation layer - most often some kind of templates, ObjectLedge uses own MVC implementation and Velocity templating language - to avoid problems when changing the way data is presented or changing the way business logic works.

ObjectLedge MVC implementation is based on ideas from Jakarta Turbine project. It uses a number of dedicated Valve components inserted into a pipeline embedded in LedgeServlet. Together with the pipeline and selector components, valves create a Controller part of a MVC framework. The most important valves are:

The ActionExecutorValve executes actions. Actions are components which when executed are expected to make changes in Model part of MVC architecture. For example an update of address data in the phone book database is an action.

The BuilderExecutorValve executes builders, a View part of MVC architecture. Views are not expected to make changes in the Model. The role of a View is to present data and UI controls to the application user. For example a list of address entries in an address database together with buttons which allow editing entries and viewing their details constitute a view. The view itself does not change database contents but exposes GUI for executing such actions. The other example is a view with a form for address entry editing. This form may be connected with entry update action as mentioned above.

The ObjectLedge MVC framework is created upon following concepts:



Copyright © 2003-2006 objectledge.org. All Rights Reserved.