Java Reference
In-Depth Information
Java EE Application Design
In the past few sections I laid the foundation for exploring Java EE application design in
greater detail. However, the design of Java EE software is a huge subject in itself, and
many topics have been written about it. My intention in this topic is to simplify Java EE
application design and development by applying patterns and best practices through the
Spring Framework. Hence, in keeping with the theme and for the sake of brevity, I will
cover only those topics relevant in this context. This will enable me to focus, in the forth-
coming chapters, on only those topics that are essential for understanding the subject.
Some developers and designers are of the opinion that Java EE application design is
essentially OO design. This is true, but Java EE application design involves a lot more
than traditional object design. It requires finding the objects in the problem domain and
then determining their relationships and collaboration. The objects in individual layers
are assigned responsibilities, and interfaces are laid out for interaction between layers.
However, the task doesn't finish here. In fact, it gets more complicated. This is because,
unlike traditional object design, Java EE supports distributed object technologies such as
EJB for deploying business components. The business components are developed as
remotely accessible session Enterprise JavaBeans. JMS and message-driven beans (MDB)
make things even complex by allowing distributed asynchronous interaction of objects.
The design of distributed objects is an immensely complicated task even for experi-
enced professionals. You need to consider critical issues such as scalability, performance,
transactions, and so on, before drafting a final solution. The design decision to use a
coarse-grained or fine-grained session EJB facade can have serious impact on the overall
performance of a Java EE application. Similarly, the choice of the correct method on
which transactions will be imposed can have critical influence on data consistency.
Simplifying Application Design with Patterns
Application design can be immensely simplified by applying Java EE design patterns.
Java EE design patterns have been documented in Sun's Java Blueprints ( http://java.sun.
com/reference/blueprints ) and also in the topic Core J2EE Design Pattern (Prentice Hall,
2003). They are based on fundamental object design patterns, described in the famous
book Design Patterns: Elements of Reusable Object-Oriented Software (Addison Wesley,
1994). These patterns are also called Gang of Four (GOF) patterns because this topic was
written by four authors: Eric Gamma, Richard Helm, Ralph Johnson, and John Vlissides.
The Java EE patterns catalog also takes into the account the strategies to meet the
challenges of remotely accessible distributed objects besides the core object design
Search WWH ::

Custom Search