• Email
  • Like
  • Save
  • Private Content
  • Embed
 

Design Patterns Illustrated

by

  • 12,818 views

Illustrations to show the essence of the 23 "classical" Gang Of Four design patterns. Plus some general info about object oriented progr

Illustrations to show the essence of the 23 "classical" Gang Of Four design patterns. Plus some general info about object oriented progr

Accessibility

Categories

Upload Details

Uploaded via SlideShare as Adobe PDF

Usage Rights

© All Rights Reserved

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel

23 Embeds 518

http://www.slideshare.net 376
http://randomtower.blogspot.com 49
http://peepedangle.blogspot.com 42
http://www.lmodules.com 16
http://peepedangle.blogspot.in 5
http://peepedangle.blogspot.ca 4
http://www.proposable.com 4
url_unknown 3
http://peepedangle.blogspot.de 3
http://randomtower.blogspot.mx 3
http://randomtower.blogspot.com.au 1
http://randomtower.blogspot.fr 1
http://randomtower.blogspot.ca 1
http://randomtower.blogspot.it 1
http://randomtower.blogspot.pt 1
http://www.blogger.com 1
http://peepedangle.blogspot.co.nz 1
http://www.peepedangle.blogspot.com 1
http://blendedschools.blackboard.com 1
http://drizzlin.com 1
http://local.mrc.medicalrecords.com 1
http://facebook.slideshare.com 1
http://peepedangle.blogspot.ru 1

More...

Statistics

Likes
46
Downloads
947
Comments
6
Embed Views
518
Views on SlideShare
12,300
Total Views
12,818

16 of 6 previous next Post a comment

  • cyriux martraire cyrille, Software Developer at Arolla That's a good idea to illustrate the patterns with real-life metaphors, though some are more difficult than others. Cheers 2 years ago
    Are you sure you want to
  • HermanPeeren Herman Peeren, Software Developer at Yepr The video is also available now: http://jandbeyond.org/video/monday-may-31st-2010/item/229-design-patterns-illustrated-herman-peeren.html

    Unfortunately the video doesn't show the slides. You should see both at the same time.

    Before the talk I showed a picture of Saint Isidoro di Sevilla: http://sjsm.files.wordpress.com/2009/04/san-isidoro2-jpegggg.jpg . That is what I talk about in the beginning.
    2 years ago
    Are you sure you want to
  • JohanJanssens Johan Janssens, CEO Timble at Timble Thanks for the rectification’s Herman. One further remark, the coupling you describe with mixins is actually an advantage and it’s done by design :

    - If you mix in a method in a base class, you can later choose to override that method in an extended class. This give you the ability to re-use the mixin functionality and specialize it by extending the class.

    - If you mix in a method and you want to override that method you could also do so by mixing in a new mixin that specifies the same method. The mixins are mixed using a LIFO array.

    In both scenarios you are not coupling, but de-coupling.

    As a bonus, the mixin implementation in Nooku Framework is even more powerful then the one in Rails. We have added the concept of dynamic and selective mixing.

    - Dynamic mixing allows you to instantiate a mixin and mix it with multiple objects as in a one to many relationship. This offers a number of benefits and some interesting flexibility.

    - Selective mixing allows the mixin to make available a number of it’s public methods to the mixer based on a set of conditions, or it can choose to not make available any methods at all.

    Both the dynamic mixing and selective mixing bring Nooku Framework very close to the basic concepts of AOP (Aspect Oriented Programming).

    Hope this helps to further clarify.
    2 years ago
    Are you sure you want to
  • HermanPeeren Herman Peeren, Software Developer at Yepr Comment by @johanjanssens via Twitter: slide 47 : NFW mixes objects against their public interface mixing only public methods and properties.

    That is a comment on my remark 'beware of tight coupling'. I made that remark mainly because IMHO there could be a problem if mixing in a method with a name that allready exists in the 'native' or mixed methods of that KObject. You have to know those names in order to prevent conflicts. So that is tight coupling.

    A mixin is a very powerful and handy way to put the same functionality in several parts in the code. Nothing wrong with it. I think it is very useful if the number of mixins is limited and their methods are treated as 'reserved words'.
    2 years ago
    Are you sure you want to
  • HermanPeeren Herman Peeren, Software Developer at Yepr Correction for slide 35 (Chain of Command):

    The commands in a KCommandChain in Nooku are command-objects (see: Command-pattern). They are KCommandHandlers, that implement the KCommandInterface. So: they are objects that execute their task upon calling their execute()-method.

    When running the command-chain you run a task and look in the chain which command-object will handdle it. Just like here:
    https://www.ibm.com/developerworks/library/os-php-designptrns/#N101DE
    (the IComand in that code has the same purpose as the KCommandInterface in Nooku).
    The NFW chain of command == chain of responsibility + command pattern.
    Thank you, Johan, for showing this to me.

    So: I was wrong thinking the KCommandChain was just a kind of macro, meant for running a series of commands. The confusion is that the commandhandlers are called 'commands'. The commandhandlers are command-objects and they handle the request (the parameters of run()).
    2 years ago
    Are you sure you want to
  • HermanPeeren Herman Peeren, Software Developer at Yepr Some explanatory text to our design patterns illustrations:
    http://www.blaisepascal.eu/index.php?actie=./peeren/page1

    (from an article for a Delphi magazine). Some small examples are from Delphi, but the principles remain the same.
    2 years ago
    Are you sure you want to
Post Comment
Edit your comment

Design Patterns Illustrated Design Patterns Illustrated Presentation Transcript