8.1 SEPARATING PRESENTATION FROM BUSINESS LOGIC
When discussing J2EE, we introduced the concept of encapsulating our business-specific software into software units called Enterprise Java Beans (EJBs). We said that if put all of our business functions into EJBs and then hosted these on a J2EE application server, we could rely on the server doing all the challenging and complicated middleware stuff; such as enabling the bean to be accessed by many clients at once without collapsing under the strain. In Chapter 9, we shall look in detail at some of the underpinning technologies of J2EE in order to see how the middleware works.
Most of the time, when developing an application that runs on a J2EE application server, the entire set of software functions we end up needing will fall neatly into two functional areas. The first area is concerned with implementing the UI and the other is the ‘brains’ of the application, as shown in Figure 8.2.
We generally refer to the software concerned with the user interface as the presentation logic, or presentation layer. The rest we refer to as the business logic, or business layer. This relatively neat division of functionality is exploited by the J2EE architecture, to the benefit of the programmer, by providing distinct J2EE tools for ...