Java Reference
In-Depth Information
Design patterns describe reusable solutions to commonly occurring design prob-
lems. They are tested guidelines and best practices accumulated and documented by
experienced developers and designers. A pattern has three main characteristics:
• The context is the surrounding condition under which the problem exists.
• The problem is the difficult and uncertain subject area in the domain. It is limited
by the context in which it is being considered.
• The solution is the remedy for the problem under consideration.
However, every solution to a problem does not qualify it as a pattern. The problem
must be occurring frequently in order to have a reusable solution and to be considered as
a pattern. Moreover, patterns must establish a common vocabulary to communicate
design solutions to developers and designers. For example, if someone is referring to the
GOF Singleton pattern, then all parties involved should understand that you need to
design an object that will have only a single instance in the application. To achieve this
design pattern, its description is often supplemented by structural and interaction dia-
grams as well as code snippets. Last but not least, each pattern description generally
concludes with a benefit and concern analysis. You will take a detailed look at the con-
stituents of a pattern when I discuss the pattern template in Chapter 2.
The Java EE Design Pattern Catalog
As stated earlier, Java EE has been the dominant enterprise development platform for
nearly ten years. Over this period, thousands of successful applications and products
have been built using this technology. But some endeavors have failed as well. There are
several reasons for such failures, of which the foremost is inadequate design and archi-
tecture. This is a critical area because design and architecture is the bridge from
requirements to the construction phase. However, Java EE designers and architects have
learned their lessons from both failures and successes by drawing up a list of useful
design patterns. This Java EE patterns catalog provides time-tested solution guidelines
and best practices for object interaction in each layer of a Java EE application.
Just like the platform itself, the Java EE patterns catalog has evolved over time. As dis-
cussed earlier, this catalog was first formed as part of Sun's Java BluePrints and later
elaborated on in the topic Core J2EE Design Pattern (Prentice Hall, 2003). Table 1-1 pres-
ents the patterns with a brief description of each and its associated layer. I will discuss
each of them in greater detail in the subsequent chapters.
Search WWH ::

Custom Search