October 14, 2011 Design Patterns
October 14, 2011 Design Patterns
As you may know I’m working on Design Patterns book in Ukrainian and as most of the posts I had on patterns have UML-s, I’m considering having UML diagrams in book as well to be consistent. Thus I can either prepare them in some UML tool or just draw. See yourself.
Also drawn by me, but in advanced tool
I would like to use hand-drawn variant because it will make the book look cheery and will make the difference. It might bring some interest like “So what’s is really on that diagram?”. Also I still don’t position book as an “official” book, so I would like to have some bits of unofficially. Especially taking into account that auditory is mostly young starting developers.
I’m of course hesitating, as this variant in its origin is inaccurate (of course I can try harder). Also maintaining such diagrams is bit more difficult, but I don’t see any problem with this.
[Added later (wasn’t in original post)]
After I posted this friend suggested me to use this online uml generation tool. And it would be great another option to consider, but it generates not really what I want:
But it was extremely nice, that to generate picture above I just used this code:
# Abstract Factory
[Cat]^[WoodenCat], [Cat]^[TeddyCat]
[Bear]^[WoodenBear], [Bear]^[TeddyBear]
[IToyFactory]^[WoodenToysFactory], [IToyFactory]^[TeddyToysFactory]
[TeddyToysFactory]uses-.->[TeddyBear]
[TeddyToysFactory]uses-.->[TeddyCat]
[Client]->[IToyFactory]
[Client]->[Cat]
[Client]->[Bear]
[WoodenToysFactory]uses-.->[WoodenCat]
[WoodenToysFactory]uses-.->[WoodenBear]
Nice tool, indeed, but for extremely simple diagrams.
[Added later (15 Oct, after comments)]
After comment by Satomi Joba I tried community edition of another tool, called Astah. Below is what I was able to draw by it. Two things about it: 1) Drawing in this tool is just fabulous, smooth and easy. For me it was more quick and intuitive drawing than in such matured tools as Enterprise Architect for example. 2) Although I’m not sure I like this bold borders and I wasn’t able to quickly change styling of diagram (maybe because of edition I used?).
Markdown | Result |
---|---|
*text* | text |
**text** | text |
***text*** | text |
`code` | code |
~~~ more code ~~~~ |
more code |
[Link](https://www.example.com) | Link |
* Listitem |
|
> Quote | Quote |
Hand drawn. It's more interesting :)
hi :) I like diagrams made by tool.. because first of all this is technical book and code at the top of page typed in VS… maybe you can select some different kind of style for diagrams…
i.e. my vote tool +1
Thank you both!
Hi Andriy!
Have you tried Astah? http://astah.net/
Community edition is free and Astah Professional would be if you are interested in using Professional edition!
http://astah.net/friends-of-astah
Feel free to contact me if you have any questions through http://astah.net/contact-us.
Satomi Joba
Change Vision, Inc. (http://astah.net/)
Yes, I tried. See above.
Hand written. Looks really nice:)
Dima, thank you very much!
Probably hand drawn, but a bit more readable and more white space between rectangles
Hi, I think tool-prepared approach is far better.
@Genrih I will definitely take your concern into consideration (if I go with hand-drawn approach). Thanks.
@serhiyshumakov Thanks. Already two guys voted for the tool usage.
I like UML created by "uml generation tool" as for me it's good compromise.
Thanks, Ihor.
Sad, but it works bad for methods mentions in classes and complex diagrams.
GoF patterns won't reflect in complex diagrams. (Abstract Factory is one of the complexest). But methods are important much.
Thank you for tying out Astah, Andriy.
1) Pleased to hear you found Astah easy to draw diagrams.
2) I am afraid that you cannot change the width of Class's outline. :(
Only difference regarding the ability of style-change of diagrams between Astah Community (Edition you used) and others (Paid-editions) is a change of font. Other than that, they should be the same. What kind of style-change did you try to apply? I may be able to suggest you an option.
– Satomi
Hand drawn is good idea but it's not very readable as for me (especially words). If I read technical books I prefer to see simple diagrams, easy to read and understand which relects the idea and i don't care about style :) As for me 2nd is the best.
Btw, how would sequence diagram look like in hand drawn style ? :)
Go with hand-drawn. It makes it more accessible to your audience, more readable, and infinitely more fun than reading the geometrically-perfect ones. And besides, the tools used invalidate the 'cons' you listed. ;)