List of popular patterns & its usage which comes under Presentation Tier:
1. Intercepting Filter:
- It can be used when there is a requirement of centralized and common processing across requests
- When pre and post processing is required across or selected requests
2. Front Controller (& Application Controller):
- When there is a requirement of common logic to multiple requests
- When there is a requirement of separate processing logic from the presentation view
- When there is a requirement of centralized controlled access points
3. View Helper:
- When template based views is required like JSP, Apache Velocity etc
- When separate programming logic from view
4. Service To Worker:
- Service To Worker = Front Controller + Application Controller + View Helper
- Any presentation framework like Apache Struts
List of popular patterns & its usage which comes under Business Tier:
1. Business Delegate:
- When business-tier access from presentation-tier
- Hides service creation, invocation
2. Service Locator:
- Patterns can be used when lookup to any enterprise resource like JNDI lookup, JMS, web services etc
- When requirement of centralized and reuse (cache or reestablish connection) lookup
3. Session Facade:
- When requirement is to avoid direct client access to application's business-tier
- When requirement is to hide complex integration of business components
4. Transfer Object:
- When requirement is to access component of different tier to retrieve and update data
- When requirement is to reduce remote requests across the tier and network (enhance network performance)
5. Value List Handler:
- When requirement is to avoid the overhead of using EJB "finder" methods
- Requirement of an efficient search and iterate searched data
- Cache search result on the server side
List of popular patterns & its usage which comes under Integration Tier:
1. Data Access Object:
- Requirement of uniform data access APIs
- Requirement of decouple persistent storage from other tier
2. Service Activator:
- Requirement is to call business service, EJBs in an asynchronous manner
- Requirement is to plug topic and point-to-point messaging to enable async process
3. Web Service Broker:
- It is like exposing services to client i.e. web service
Above are main patterns which generally been used in J2EE based application. Some patterns which internally been used by frameworks like Apache Struts and Java EE components like JPA.