The Artima Developer Community
Sponsored Link

Legacy Design Forum
Designing with Interfaces

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Interfaces, Gang of Four and the Decorator Pattern

Posted by Judy Housman on July 13, 2000 at 11:42 AM

Encouraged by your reference to the Decorator Pattern in your
Designing with Threads article I took a stab at trying to
understand the Gang of Four's Decorator Pattern. I know Java
but no C or other Object-Oriented Language. I experimented with
the Java code and it appears to me that while you need the component
interface there is no need or way to include the Decorator class
even when you add multiple responsibilities.

All you need is the interface and the classes that add functionality
to your original class.

Is this true? Is this because of the availability of interfaces
in Java.

Or am I just offbase.

I'm new to understanding design patterns and I think that your
articles which I am now rereading are fabulous. I can send code
from my rudimentary experiment to understand the Decorator.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us