News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Anthony Ferrara:
Mediators - Programming With Anthony
January 24, 2013 @ 10:52:23

Anthony Ferrara has posted his latest "Programming with Anthony" video episode today pattern is more of a behavioral structure, defining how objects interact with each other.

The Mediator Pattern is an extremely flexible and useful tool to help decouple your code and provide added flexibility in your applications. We'll explore the basic concept of a Mediator, some places you've used it and some things that you can do to improve upon the basic concept.

You can watch the video either in the post or over on YouTube. If you enjoy the episode, you should also consider the rest of the videos in the series, all available from this playlist.

0 comments voice your opinion now!
mediator designpattern video tutorial youtube playlist


Anthony Ferrara's Blog:
Handling Plugins In PHP
March 09, 2012 @ 13:34:38

Anthony Ferrara has a new post today looking at plugin handling and a few of the more common design patterns that can be used to implement them in your applications.

A common problem that developers face when building applications is how to allow the application to be "plug-able" at runtime. Meaning, to allow non-core code to modify the way an application is processed at runtime. There are a lot of different ways that this can be done, and lots of examples of it in real life. Over a year ago, I wrote a StackOverflow Answer on this topic. However, I think it deserves another look. So let's look at some patterns and common implementations.

The patterns he covers are:

  • Observer
  • Mediator
  • Strategy
  • Decorator
  • Chain of Responsibility

For each there's both a bit of sample code showing it in use and links to some examples from various frameworks and other projects.

0 comments voice your opinion now!
plugin designpattern observer mediator strategy decorator chainofresponsibility


DevShed:
Object Interaction and Mediator Classes in PHP 5
March 21, 2007 @ 11:16:00

DevShed wraps up yet another in their design pattern series of articles today with this new tutorial - the final part in their look at using Mediator classes in PHP5.

At this stage I believe that implementing the mediator pattern with PHP 5 should be a pretty painless process to you, but if the examples that I showed you in the first article weren't enough to help you completely grasp this pattern, over the course of this last tutorial I'm going to expand the original mediator class that you learned previously. The expansion will make it capable of maintaining three classes in perfect synchronization.

They start off with the base Mediator class they developed in previous parts of the series and expand it out some more with the functionality needed to keep three (not just two) objects synchronized. To help out, they build some more file handling classes, ones that work with the three different types - numeric, alpha, and alphanumeric content.

0 comments voice your opinion now!
designpattern interaction mediator php5 object designpattern interaction mediator php5 object


DevShed:
Introducing Mediator Classes in PHP 5
March 13, 2007 @ 11:22:00

DevShed starts off another design patterns series with this new article introducing the Mediator class pattern - a method to keep things up to date and synchronized in your PHP application.

Well, in this case, the synchronization between a group of PHP classes can be made by implementing a useful pattern widely known as "mediator." In short, when the mediator pattern is applied, there's a single class that implements the logic required to keep all the other classes completely synchronized with each other. This means that not only will all the modifications introduced by one class be reflected in the others, but that those changes will be performed via the interface of the mediator class.

They Apply this pattern with their traditional example of working with files - this time the class will handle the communication (and syncing) between two file handling objects. They add a file handling class on to the back end and apply them both in an example that lets you manipulate the data inside both files at the same time.

0 comments voice your opinion now!
php5 mediator designpattern tutorial class file handler content php5 mediator designpattern tutorial class file handler content



Community Events











Don't see your event here?
Let us know!


opinion facebook performance language framework install hack component unittest series application symfony2 hhvm release database package composer introduction security podcast

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework