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 torealize 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:
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 usbuild 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 alsoexhibit sufficient
– the potential for an application to support increased load, givenappropriate 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 requiredeploying multiple server instances in a
. Clustering is a complex problem requiring sophisticated application server functionality. We must ensure that our applications aredesigned 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 ispromoted by the use of proven
– recurring solutions to common problems.The concept of design patterns was popularized in OO software development by the classicbook
Design Patterns: Elements of Reusable Object-Oriented Software
ISBN 0- 201-63361-2
), which describes 23 design patterns with wide applicability. These patterns arenot technology-specific or language-specific.It's vital that we use J2EE to implement OO designs, rather than let our use of J2EE dictateobject 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 highlyrelevant to J2EE.