Design Patterns Refcard Available for Download
DZone continues its Refcardz series with a new, free PDF cheatsheet on Design Patterns. Written by Patterns expert, Jason McDonald, this Refcard provides a quick reference to the original 23 Gang of Four design patterns, as listed in the book Design Patterns: Elements of Reusable Object-Oriented Software. Each pattern includes class diagrams, explanation, usage information, and a real world example. Features include Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Observer, Template Method and more...
Download Now
- Login or register to post comments
- 6407 reads
- Email this Article
- Printer-friendly version
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)







Comments
Slava Imeshev replied on Mon, 2008/06/16 - 6:53pm
Just out of curiocity, why is the download page asking me all those interesting personal and corporate details? It would be understandable if it were a white paper from a vendor so that the vendor could follow up on possible interest in a product that solves a particular problem, but a refcard on design patterns?
Slava
Jill Tomich replied on Tue, 2008/06/17 - 10:08am
in response to: imeshev
Hello Slava,
The main reason we ask for the profile information is so that we can deliver value add offers to our members later on with minimal hassle to them. You only ever need to fill out one form to get anything on our site. These value add offers might include things like sets of printed Refcardz in the near future.
-- Jill
Imtiyaz Basha replied on Wed, 2008/06/18 - 4:55am
Imtiyaz Basha replied on Wed, 2008/06/18 - 5:05am
I am getting
'Invalid Download Request' Your download token is invalid or you have downloaded this asset too many times . If you believe this to be an error, please contact support@dzone.com and we'll try to resolve the situation.
Though I have not downloaded this card... poor service...
Brian Hainey replied on Wed, 2008/06/18 - 5:38am
Hi
I'm disappointed that some of the diagrams in this RefCard do not strictly use UML notation.
Take the 'Chain of Responsibility' diagram. The relationship between concrete handlers and the handler interface is operation inheritance so a UML implements relationship should be used. The diagram in the card uses the same relationship as that between the client and the Handler interface i.e. a directed association. Also, the arrowheads on the directed association relationships appear to have filled arrow heads and not open arrow heads as they should be if UML notation is used.
The diagrams for other patterns in the refcard do show inheritance correctly but again the directed associations have filled arrow heads.
If the intention was not to stick strictly to UML notation then a statement should be made that faux UML is being used otherwise, as a matter of urgency, the diagrams should be corrected.
Brian
Matthew Schmidt replied on Wed, 2008/06/18 - 9:16am
in response to: bh95582
Hi Brian. Thanks for letting us know about this oversight. The designer may have taken some "artistic liberties". We'll try to get these corrected and upload a new version.
-Matt
Brian Hainey replied on Wed, 2008/06/18 - 9:24am
in response to: matt
Thanks Matt
I look forward to the corrected version.
Brian
Matthew Schmidt replied on Wed, 2008/06/18 - 12:59pm
in response to: immu
Hi Imtiyaz. Please send your download token email matt at dzone.com and I'll reset your token. We've changed a thing or two that may help.
-Matt
Jill Tomich replied on Wed, 2008/06/18 - 1:04pm
in response to: bh95582
Hi Brian,
The Design Patterns refcard has been updated, and is now available. To access it, hit your download link again. If you have any problems, please let me know by emailing me at refcardz@dzone.com.
Thanks again for the feedback.
-- Jill
Brian Hainey replied on Wed, 2008/06/18 - 4:45pm
I've downloaded the latest version and I think most of the issues have now been addressed. One of the issues I mentioned in my original post has still not been corrected. It concerns the arrow heads on unidirectional associations and dependencies. In UML these are open arrow heads and in the refcard the arrow heads are filled. Take the Visitor pattern as an example. The Client class has a unidirectional association with both the Element interface and the Visitor interface. In the refcard the arrow heads at the end of the associations are filled rather than open. To consider another example, the Factory Method pattern, the ConcreteCreator class has a dependency on the ConcreteProduct class. The arrow head on the dependency in the refcard is a filled arrow head when it should be an open arrow head.
Brian
Jason McDonald replied on Wed, 2008/06/18 - 5:34pm
in response to: bh95582
Brian,
I'm a bit confused... Open arrows are used to show inheritance. Closed arrows are simply a directional attribute at the end of the association.
So, using the Visitor pattern as an example, the Client object is associated with both the Visitor and the Element. The arrow in this case could technically be dropped but I left it in to show that the Client object is doing something with/to the other two objects. In this same pattern you will see an open arrow from the ConcreteVisitor to the Visitor, signifying that the ConcreteVisitor inherits from Visitor.
Likewise, the dashed arrow in the Factory Method diagram, from ConcreteCreator to ConcreteProduct, shows that there is an association between the two and that ConcreteCreator has a dependency upon ConcreteProduct. That is, the ConcreteCreator is useless unless it has one or more ConcreteProducts to create.
If you still feel that there are corrections to be made, please let us know - it is our goal to make sure that this is as accurate as possible.
Also, check these out:
http://dn.codegear.com/article/31863#classdiagrams
http://www.digilife.be/quickreferences/QRC/UML%20Reference%20Card.pdf
Jason McDonald
Jason McDonald replied on Wed, 2008/06/18 - 7:50pm
in response to: bh95582
I believe we are crossing in semantics... I thought about this my whole commute home and I think I realized what you are saying.
You mention the opened arrow, which I took to mean the inheritance arrow:

After thinking about it more what I think you mean is to replace the solid arrows:

With line arrows:

Is this correct?
The use of the solid arrows as opposed to the line arrows was strictly a design choice. Both are used frequently, even though the line arrows are technically the correct one to use with class diagrams. When I originally wrote the quick reference the fonts and diagrams were much smaller because all 23 patterns had to fit on just two pages. Now that the patterns are spread over 7 pages, I think it will be a bit easier to read if we use the line arrows.
I will talk with Jill and the rest of the dzoners about changing this out.
Jason Mcdonald
Brian Hainey replied on Thu, 2008/06/19 - 2:37am
Hi Jason
Yes, that's correct.
Thanks
Brian
meta replied on Thu, 2008/06/19 - 5:04am
I cannot download files from the link in the e-mail from you. Explorer shows the download dialog with progressbar but never starts the download itself. And after a while says it cannot download from your site.
And there is no messages regarding contact with support@dzone.com as it was in Imtiyaz Basha's case.
Couldn't you fix the problem?
--- Meta
Jill Tomich replied on Thu, 2008/06/19 - 9:44am
in response to: bh95582
Hi Brian,
We are updating the refcard to reflect the correct arrow style. I will let you know when a new file is uploaded.
-- Jill
Jill Tomich replied on Fri, 2008/06/20 - 9:40am
A new version of the Design Patterns Refcard has been uploaded.
-- Jill
Brian Hainey replied on Fri, 2008/06/20 - 1:39pm
Hi Jill
The Refcard looks good. I think all the diagrams are correct now.
Thanks
Brian
Jill Tomich replied on Fri, 2008/06/20 - 1:45pm
in response to: bh95582
Hi Brian,
Great. Thanks again for all of the feedback.
-- Jill
meta replied on Mon, 2008/06/23 - 5:34am
Still get no reply. Are you there?
I am still getting error on attempt to download your files (see details in my previous post).
Wouldn't you be so kind to explain what is wrong with the links?
Do you need some more information?
Have you some less tricky way to access your files?
Do you only gather private information?
--- Meta
Matthew Schmidt replied on Mon, 2008/06/23 - 6:03am
in response to: meta
Hi Meta. Please send an email to matt at dzone.com and I'll get you straightened out.
-Matt