Chapter 1
16
This book reflects my experience and discussions with other enterprise architects. I will attempt to
justify the claims made in this chapter in the remainder of the book. However, there are, necessarily,
many matters of opinion.
In particular, the message I'll try to get across will be that we should apply J2EE to
realize OO design, not let J2EE technologies dictate object design.
Familiarity with J2EE components has been assumed. We'll take a close look at container services
in the following chapters, but please refer to an introductory book on J2EE if the concepts discussed
are unfamiliar.
Goals of an Enterprise Architecture
Before we begin to examine specific issues in J2EE architecture, let's consider what we're trying to achieve.
A well-designed J2EE application should meet the following goals. Note that while we're focusing on
J2EE-based solutions, these goals apply to all enterprise applications:
❑ Be robust
Enterprise software is important to an organization. Its users expect it to be reliable and bug-
free. Hence we must understand and take advantage of those parts of J2EE that can help us
build robust solutions and must ensure that we write quality code.
❑ Be performant and scalable
Enterprise applications must meet the performance expectations of their users. They must also
exhibit sufficient scalability – the potential for an application to support increased load, given
appropriate hardware. Scalability is a particularly important consideration for Internet
applications, for which it is difficult to predict user numbers and behavior. Understanding the
J2EE infrastructure is essential for meeting both these goals. Scalability will typically require
deploying multiple server instances in a cluster. Clustering is a complex problem requiring
sophisticated application server functionality. We must ensure that our applications are
designed so that operation in a cluster is efficient.
❑ Take advantage of OO design principles
OO design principles offer proven benefits for complex systems. Good OO design practice is
promoted by the use of proven design patterns – recurring solutions to common problems.
The concept of design patterns was popularized in OO software development by the classic
book Design Patterns: Elements of Reusable Object-Oriented Software from Addison Wesley, (ISBN 0-
201-63361-2), which describes 23 design patterns with wide applicability. These patterns are
not technology-specific or language-specific.
It's vital that we use J2EE to implement OO designs, rather than let our use of J2EE dictate
object design. Today there's a whole "J2EE patterns" industry. While many "J2EE patterns"
are valuable, classic (non-technology-specific) design patterns are more so, and still highly
relevant to J2EE.