Wednesday, October 13, 2010

PatternCraft – Mediator Pattern vs. Framework Mediators

*quick note - this video compares the Mediator Pattern to using Mediators in the Robotlegs framework. I start with a simple demo and refactor to both approaches so there is A LOT of simple code being thrown around to show you how you can do the same thing in so many different ways.

Hey guys, I've been trying to catch up on sleep the past couple weeks while trying to shake this cold. Hopefully I can get back on track to releasing a video per week now that I'm feeling better.

Anyway, this Mediator Pattern video really has very little to do with Starcraft since it's all about linking up buttons and a textfield. If you'd like, you can pretend I opened Starcraft and demoed the menu system or something if that makes you feel better ;)

You can watch it in the player below or just download it here to watch however you'd like:


Other PatternCraft tutorials:
Visitor Pattern
Memento Pattern
Command Pattern
State Pattern
Strategy Pattern

19 comments:

  1. [...] PatternCraft – Mediator Pattern vs. Framework Mediators [...]

    ReplyDelete
  2. [...] PatternCraft – Mediator Pattern vs. Framework Mediators [...]

    ReplyDelete
  3. [...] PatternCraft – Mediator Pattern vs. Framework Mediators [...]

    ReplyDelete
  4. [...] PatternCraft – Mediator Pattern vs. Framework Mediators [...]

    ReplyDelete
  5. [...] PatternCraft – Mediator Pattern vs. Framework Mediators [...]

    ReplyDelete
  6. [...] http://johnlindquist.com/2010/10/13/patterncraft-mediator-pattern-vs-framework-mediators/ KategorienActionScript3 Tags: AS3, Framework, RobotLegs Kommentare (0) Trackbacks (0) Einen Kommentar schreiben Trackback [...]

    ReplyDelete
  7. Excellent, like the previous videos. Thanks !

    ReplyDelete
  8. Hjlammers5:30 AM

    Thanks a lot for doing these videos. Learning so much from it and for me a lot more fun and easier to understand than reading it in a book.

    ReplyDelete
  9. johnlindquist5:34 AM

    You're welcome :) I've always thought that most books tend to overcomplicate patterns which is ironic because patterns are supposed to make your code easier to read and maintain.

    ReplyDelete
  10. daYop2:49 PM

    please go on :)

    ReplyDelete
  11. Rmingardo4:17 AM

    Thanks John
    again thanks for this series on DP.
    In my "very low" opinion (for RL user like me) RL Miadiator is THE MAGIC of that Framework! I Love it and your explanation (even if you typed at the velocity of light!!) is absolutely lovely!
    Thanks again to you and to the RL guys!
    Roberto.

    ReplyDelete
  12. Aaron4:46 PM

    I'm coming from a non-programmer background and struggle with staying in sync with the logic your explaining and the code you're writing because of all of the IDE shortcuts you use. Would you mind saying what keys you're pressing so I can follow along?

    ReplyDelete
  13. Aaron7:46 AM

    If you were programming this from scratch, would you get the the point where you have the demo, and then refactor it into the Mediator, or you'd just create the mediator from the start? I'd like to know the logic for creating it from scratch. "Oh, because this is going to be controlling...blah blah... that is the indicator that... we need a mediator instead of a ...".

    ReplyDelete
  14. love these videos. please keep it up!

    ReplyDelete
  15. Gilson Maciel6:45 AM

    Hey dude, im glad to see those videos about design patterns. Congratulations for the grea work. Cant wait do see more videos about the other design patterns.

    Cheers!

    ReplyDelete
  16. I would suggest you that before you start code anything, get a blank paper sheet and draw your application as boxes. Divide app to View, Model and Controller first and then Mediators, Components, VOs, Commands. It really help to remove a few mistakes at the beginning.

    ReplyDelete
  17. Very glad that I found this tutorial today - I'd been trying implement the mediator pattern and was getting thrown off by conflicting definitions of it. And this perfectly illustrated the differences! Help me a lot, thanks for doing these!

    ReplyDelete
  18. Gregg6:56 AM

    Just an FYI....this post doesn't actually have the "PatternCraft" tag applied to it so it doesn't appear with the other, related videos when you view that tag category. Anyhow, thanks for taking the time to put these together!

    ReplyDelete
  19. johnlindquist7:09 AM

    Thanks, updated the tags.

    ReplyDelete