• Email
  • Favorite
  • Download
  • Embed
  • Private Content

Loading…

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

Design Patterns Illustrated

by Herman Peeren on Jun 03, 2010

  • 9,167 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

Tags

illustrations nooku gof design pattern design patterns joomla design-patterns patterns metaphor picture design patterns slide design php

More...

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

16 Embeds 485

http://www.slideshare.net 376
http://randomtower.blogspot.com 40
http://peepedangle.blogspot.com 34
http://www.lmodules.com 16
http://www.proposable.com 4
url_unknown 3
http://peepedangle.blogspot.de 3
http://randomtower.blogspot.pt 1
http://www.peepedangle.blogspot.com 1
http://peepedangle.blogspot.co.nz 1
http://blendedschools.blackboard.com 1
http://drizzlin.com 1
http://local.mrc.medicalrecords.com 1
http://facebook.slideshare.com 1
http://www.blogger.com 1
http://randomtower.blogspot.it 1

More...

Statistics

Favorites
38
Downloads
664
Comments
6
Embed Views
485
Views on SlideShare
8,682
Total Views
9,167

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 1 year ago Reply
    Are you sure you want to Yes No
  • 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.
    1 year ago Reply
    Are you sure you want to Yes No
  • 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.
    1 year ago Reply
    Are you sure you want to Yes No
  • 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'.
    1 year ago Reply
    Are you sure you want to Yes No
  • 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()).
    1 year ago Reply
    Are you sure you want to Yes No
  • 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.
    1 year ago Reply
    Are you sure you want to Yes No
Post Comment
Edit your comment Cancel

Design Patterns Illustrated — Presentation Transcript