
Architecting a J2EE Application
• With the advent of many clients, architecting a solution using J2EE becomes more important.
- The J2EE spec can’t really limit you on how you should design your applications.
- J2EE was created to make flexible systems and its standard architecture recommendations reflect that
focus.
- In some solutions it might be better to simplify design to create applications faster or in a more
traditional client-server design.
• Standard solutions to distributed architectures separate out concerns to build a more flexible, extendable
architecture.
- The user interfaces to data and business logic change rapidly and separating out the UI from other
components allows the change of UI without other changes.
- Business logic and database structure usually don’t change as rapidly as UI. In face the core data store
will commonly remain static. By letting this be separated from the UI we can keep and build onto the
business and infrastructure of our applications.
• Using a three-tier solution is appropriate when you have requirements that include.
- The need to quickly change your user interface.
- The need to increase modularity by separating up presentation and the business logic.
- The need to create separate roles to increase how many people can work on a given project.
- The need to separate back end programmers from UI concerns.
- The need to build, reuse and buy business components.
- The ability to use to multiple platforms.
- The ability to save data without changing the consumer of the data while loosely coupling the
application and the consumer.
• If a system doesn’t have all of these needs or concerns you might be better off with a simpler system.
- The three-tier solution is desirable and creates extendable, scalable applications.
- This solution can be overkill for some applications and in many cases developers will design for easier
use.
- Decisions on how to build your system are not always easy to make and there are many trade offs.
• J2EE Multi-tier Application
• Client Server Web Architecture
• Multi-tier EJB centric design
Model - View - Controller (MVC)
• The thrust of much of J2EE is the separation of concerns between different parts of the application.
• Model/View/Controller is a design pattern that provides a logical way of thinking about this separation.
- The Model of an application is its data.
- The View is the presentation piece, or what it looks like.
- The Controller is how it reacts to changes, or application behavior.
• MVC is traditionally used to define GUI applications in a way that would allow rapid change of one of
the components.
• Three tier web server
Architecting a J2EE Application
Table of Contents
Copyright (c) 2008. Intertech, Inc. All Rights Reserved. This information is to be used exclusively as an
online learning aid. Any attempts to copy, reproduce, or use for training is strictly prohibited.
Courseware
Training Resources
Tutorials