News Feed
Sections




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

DevShed:
An Introduction to the Observer Pattern in PHP
July 17, 2006 @ 13:48:34

DevShed is starting off a new series today with the first part of their look at design patterns, specifically this time, the Observer pattern.

If you have reached the point in your programming life where you are using design patterns, you will want to read this article. The first of a three-part series, it covers the Observer pattern, which can be just the thing for situations where objects need to send information to a centralized mechanism.

I hope you'll be wondering how all this boring theory can be translated into functional PHP code. That's what I'm going to do in the course of this article, by introducing some friendly examples of how to implement the Observer pattern in PHP applications.

They just right in and create a more practical example, opting for demonstration over a lot of explaination. Their sample code manipulates strings to change them to uppercase and save them off to a file. They attach a basic error logger to it and then conform it to fit in with the Observer pattern style.

0 comments voice your opinion now!
design pattern observer introduction tutorial part1 design pattern observer introduction tutorial part1


blog comments powered by Disqus

Similar Posts

NetTuts.com: Programming With Yii2: Exploring MVC, Forms and Layouts

Zend Developer Zone: Reading and Writing Spreadsheets with PHP

DZone.com: MySQL PHP search: four-part video tutorial series

PHPBuilder.com: File uploads made easy

Carson McDonald's Blog: Building HipHop PHP for Fedora 12 on 64 bit and 32 bit Systems


Community Events

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


version library introduction api php7 framework interview opinion voicesoftheelephpant list community series security laravel language podcast laravel5 example extension release

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