Applying J2EE Technologies
Overview
In this chapter we'll take a deeper look at some of the key decisions involved in developing a J2EE architecture, especially those we discussed in . We'll discuss:
-
Choosing between a collocated and distributed architecture
This is a particularly important decision with implications for performance, ease of implementation, scalability, robustness and the type of clients that an app can support. This decision should be made early in the design process, as it has implications for many other design decisions.
- Choosing if and how to use EJB
As we saw in , EJB is a powerful technology that can help us solve some complex problems, but which may introduce unwarranted complexity if we don't need its full capabilities. In this chapter, we'll take a closer look at when, and how, to use EJB to enjoy its benefits but avoid its drawbacks.
- Choosing when to use messaging
Sometimes business requirements call for asynchronous app behavior or the use of messaging to communicate with other apps. In other cases we may choose to use messaging within an app. We'll consider EJB container services for JMS messaging, and how to decide when to use asynchronous messaging as an implementation strategy.
- Authentication and authorization issues
And especially how they relate to web apps.
- Using XML in J2EE apps
XML is a core J2EE technology, and XML is becoming increasingly important in web apps and in the enterprise. We'll look at how XML can be used effectively in J2EE apps, and areas in which the use of XML may prove counterproductive.
- Caching issues
Most apps, and especially web apps, need to cache some data to minimize the expense of querying persistent data sources. We'll consider the potential benefits and challenges of implementing caching.
After we discuss each issue, we'll make the relevant decisions for our sample app. While the sample app is just one – relatively simple – J2EE app, this serves to highlight many common problems and demonstrate the trade-offs called for in real projects.
We won't talk about data access in this chapter. This important topic will be addressed in s 7, 8, and 9. We'll also pay relatively little attention to the implementation of the web tier. This will be discussed in detail in s 12 and 13.
Comments