| CONTENTS | PREV | NEXT | INDEX | J2EE BluePrints |
Choices such as which tier or tiers of the application that clients interact with, the protocols used for this communication, and the implementation language used for the client are dependent on several factors. Different tiers expose different levels of detail and complexity.
The Web tier presents a simplified functional facade to the application. It takes care of presentation issues for the client. The EJB tier presents an interface to access and manipulate the business objects according to the business rules set in the application, leaving presentation issues to the client connecting to it. The enterprise information system tier presents a raw view of the data, delegating the responsibility of enforcing the business rules, as well as presenting the data to the client.
The protocols used for communication have different strengths and limitations. The Web tier typically uses HTTP-based protocols. HTML over HTTP is suitable for handling the presentation needs of the client, while XML over HTTP is better suited for interchange of data to be presented by the client. The EJB tier uses the RMI-IIOP protocol. As a full-scale distributed computing protocol, it gives the client direct access to the services of the EJB tier. A client can use business objects hosted by the EJB server and can participate in transactions.
For clients of the J2EE platform, the Java programming language is the implementation language of choice because Java technology-based implementations can take advantage of services provided by the platform. Other languages, such as C++ and Visual Basic, can be used, albeit with some limitations.
Many aspects of the client are determined by the tier of the enterprise application the client connects to. This discussion classifies clients into three broad categories based on the tiers that they interact with:
- Web clients connect to the Web tier. They execute on a desktop or other browser host usually inside a Web browser or a browser plug-in. The presentation logic as well as the business logic of the application can run on the server or the client.
- EJB clients connect to the EJB tier. These are typically GUI programs that execute on a desktop computer. EJB clients have access to all of the facilities of the J2EE EJB tier. The presentation logic of the application runs on the EJB client, while the business logic runs on the server.
- Enterprise information system clients interface directly to an enterprise information system resource. Typically these programs serve administrative and management functions for the back-end system. Both presentation and business logic are contained in the client.