  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Subject: Doubts on design patterns | Subject: Doubts on design patterns 2004-04-28 - By Sergey Beryozkin
Back Hi Ben, others
Lets consider servlet filter chains. IMHO they may exhibit the characterstics of both patterns. A given filter decorates the request and/or response in most cases by pre and/or post processing it. When a filter blocks a request, then it acts as a final handler in the chain, as it assumes a responsibility for the actual handling of the request. Would you agree ? Thanks Sergey Beryozkin
> 4) what is main difference between Decorator and Chain Of Responsibility?
They are not really comparable as they are completely different - think; "the difference between a banana and a melon". The Chain of Responsibility allows you to use a bunch of objects to deal with a request only if the object is responsible for the request. The Decorator allows you to add additional functionality to an object dynamically.
You can always visit www.javacoder.net and see the GoF patterns implementation there.
HTH
Ben
********************************************************************
This email may contain information which is privileged or confidential. If you are not the intended recipient of this email, please notify the sender immediately and delete it without reading, copying, storing, forwarding or disclosing its contents to any other person Thank you
Check us out at http://www.btsyntegra.com
********************************************************************
==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
==================================================================== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
|
|
 |