Tuesday, November 24, 2009

j2ee design pattern

----------------------------------------------------
>>>>>>>>>>>>>>>>Presentation Tier<<<<<<<<<<<<<<<<<<
---------------------------------------------------

Intercepting Filter :
A centralised control which hadles request from the web client.
--------------------------------------------------------------------------------
Front Controller :
A centralized point of contact for handling a request may be useful, for example, to control and log a user's progress through the site.

What is the difference betwenn Intercepting Filter and Front Controller.
--------------------------------------------------------------------------------
Composite View :
A Framework to present content in a single web page, from numerous data sources.
Tiles is a good example for this pattern

Alos it is good to refer this link
http://java.sun.com/blueprints/patterns/CompositeView.html

1. The client requests service

2. After processing the request, MainServlet (the Front Controller) directs the ScreenFlowManager to select the next view

3. The ScreenFlowManager determines the name of the screen to display

4. The request is forwarded to TemplateServlet

5. The TemplateServlet identifies the requested Screen object and stores it in HttpSession

6. The request is forwarded to the template JSP page

7. The template JSP page executes an insert tag

8. The insert tag retrieves the screen from HttpSession

9. The insert tag inserts the content from the URL corresponding to the value of its parameter attribute

10 - 12. The template JSP page executes another insert tag, which inserts the content as in the steps 7 - 9.

13. Template execution is complete, and the server returns the generated response to the client.


--------------------------------------------------------------------------------
View Helper :
Helpers provide a clean separation between presentation and business data by acting as intermediaries between the two
--------------------------------------------------------------------------------
Dispatcher View :
System controls flow of execution and access to presentation processing, which is responsible for generating dynamic content
--------------------------------------------------------------------------------
Service to Worker :
The system controls flow of execution and access to business data, from which it creates presentation content
Refer Link : http://www.corej2eepatterns.com/Patterns/ServiceToWorker.htm
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Business Tier<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--------------------------------------------------------------------------------

Business Delegate
The business delegate object abstracts the business services API and provides standard interface to al the client components.
--------------------------------------------------------------------------------
Session Facade :
Use a session bean as a facade to encapsulate the complexity of interactions between the business objects participating in a workflow. The Session Facade manages the business objects, and provides a uniform coarse-grained service access layer to clients.
--------------------------------------------------------------------------------
Service Locator
--------------------------------------------------------------------------------
Transfer Object Assembler :
The Transfer Object Assembler uses Transfer Objects to retrieve data from various business objects and other objects that define the model or part of the model.

--------------------------------------------------------------------------------
Value List Handler
--------------------------------------------------------------------------------
Composite Entity
--------------------------------------------------------------------------------
Transfer Object :

A pattern used to "Application clients need to exchange data with enterprise beans".

or

Transfer object / value object is a plain serializable Java class that represents a snapshot of some server side data, as in the following code example:
--------------------------------------------------------------------------------
>>>>>>>>>>>>>>>>>>>>>>>>>>>>Integration Tier<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--------------------------------------------------------------------------------
Service Activator :

Enterprise beans and other business services need a way to be activated asynchronously
--------------------------------------------------------------------------------
Data Access Object :

A Pattern which abstracts and encapsulate all access to the database.The DAO manages the connection with the data source to obtain and store data.

Access to persistent storage, such as to a database, varies greatly depending on the type of storage (relational databases, object-oriented databases, flat files, and so forth) and the vendor implementation.

No comments: