Xelleration & Java Design
Patterns
Xelleration
has delivered a number of projects involving all layers
of the J2EE application development model. We have experience
with most of the popular design patterns like Struts,
EAD4J, Java Blueprints, Session facades, Business Interfaces
and others.
The
following is a short overview of the Struts framework
which we use for presentation layer modules.
Overview
of Struts Framework 1.1
Struts
is part of the Apache project, a set of tools to make
dynamic Web Pages. It is a framework that brings together
JSP or Java Server Pages, Taglibs or html like keywords
with access to library calls and JSTL or the Java Standard
Tag Library. Struts combine the above visual elements
with a way to navigate through a set of mostly dynamically
written web pages. This logical part of Struts is controlled
by the Action class of Struts.
Struts
is based on an MVC architecture
The
aim of MVC architecture is to separate the business logic
and data of the application from the presentation of
data to the user. Following is the small description
of each of the components in MVC architecture:
Model
The model represents the data of an application. Anything that
an application will persist becomes a part of model. The model
also defines the way of accessing this data (the business logic
of application) for manipulation. It knows nothing about the
way the data will be displayed by the application. It just
provides service to access the data and modify it.
View
The view represents the presentation of the application. The view
queries the model for its content and renders it. The way the
model will be rendered is defined by the view. The view is
not dependent on data or application logic changes and remains
same even if the business logic undergoes modification. The
view forwards its requests to the controller which then forwards
the request to the appropriate Action.
Controller
All the user requests to the application go through the controller.
The controller intercepts the requests from view and passes
it to the model for appropriate action. Based on the result
of the action on data, the controller directs the user to the
subsequent view. Action is an implementation of an Action Class.
