[http://www.springsource.org], Hibernate
[https://www.hibernate.org], and Log4J
[http://logging.apache.org/log4j/1.2/index.html].
There is no compelling reason to “reinvent the
wheel”, as these frameworks already establish well-
known and proven design patterns.
As described, the Application Domain tiers in
Figure 1 represent encapsulations that insulate each
other from the typical changes encountered as a
software application is maintained. At the core are
the domain modules, which are specialized
functional blocks that give the application its
behavior. By having these concepts with their own
defined boundaries, changes to core domain specific
computations in the application should have minimal
effect on other areas of the application. Any ripple
effects should be confined to the interaction paths
defined in the image. When the control flow is
separated from domain computations, adding new
computations should only affect the part of the
control that invokes the computation and the related
aspects of information production and consumption.
If other ripple effects exist, they remain localized to
the specific presentation and data persistence layers
dealing with the new or altered information.
The information model tier provides a buffer
between the rest of the application and the data
persistence (read/write) interfaces. This allows
persistence structures (database schemas, file
structures, and/or sensor inputs) to change without
disrupting the rest of the application.
The Utility tier (including context/factories) is
derived based on existing framework concepts. As
we canvassed existing frameworks, the pattern
shown above emerged. When we took a step back
and looked at the pattern, we agreed that these were
functional areas that tended to be used by all of the
left-most MVC tiers, and that this definition of
layers provided a good description of the functional
boundaries and characteristics of the right-most tier.
The “Utility Domain” tiers of Figure 1 are
comprised of frameworks that encapsulate functional
areas that could be used by any of the “Application
Domain” tiers in the diagram. Each functional area
can be thought of as a general handler that is
responsible for coordinating and implementing the
underlying functionality. For example, many
components of an application will want to utilize the
logging functionality. Various application
components may require different logging behaviors
or even multiple logging mechanisms (e.g. file
logging for general information and console logging
for the most important information). The CSF
framework provides a common API to these
mechanisms. This approach isolates the
implementation details from the invoking
components. The same can be said for security,
where different security mechanisms may be needed
at the different tier levels. The security API provides
the interface to the handler, and the implementation
details are isolated from the invocation points. The
same holds for metrics and the other utility domain
components identified. These commonly used
features are grouped together as “ Domain Utilities”.
In order for the tiers and components to access
the utility domain components and potentially share
the utilities between tiers, the Context and Factory
patterns are utilized. “Application Domain” tier
components request the utility components via these
patterns, where the discovery and instantiation
operations occur. The requestors merely expect an
instance of the component to be returned. The
Context and Factory patterns enable plug-and-play
flexibility and configurability without needing to
modify code. This allows applications to change
utility behaviors by merely changing configuration
options. An example is replacing a console-based
logger with a file-based logger. The application
component that needs a logger requests the logger
mechanism from the context. Based on the
application’s configuration, the context will return
one type of logger vs. another.
3.1 Using CSF for Application Design
Following the CSF design pattern will result in a
speed up of the design process, sometimes dramatic.
Some initial CSF projects show savings of 25% for a
4 week design phase in a small project and up to
85% code reuse for a larger project, with a similar
design and existing domain functionality.
Once the top-level requirements for a project
have been established, the designers simply start
defining the functional blocks for the solution
application in relation to the CSF tiers. Working
through the Functional tiers the designers can focus
on the domain-specific aspects of the solution,
putting the right-hand more general concepts
mentally “off to the side”. The predefined tiers help
guide the designer through developing the functional
architecture of the solution. At first the user simply
outlines the functional components for the solution,
following the CSF’s recommended functional layers.
An example of a resulting design is shown in Figure
2 Product Monitoring Functional Components.
Once the key functional components have been
identified, the associations and interactions between
the components and detailed refinements of the
components are defined as shown in Figure 3
Product Monitoring Functional Architecture.
Graphical images are then produced that use a
consistent visual representation and layout of the
CSF tiers to communicate the top-level design of the
system. With this approach designers simply follow
ICSOFT 2010 - 5th International Conference on Software and Data Technologies
90