Centralizing the Validation of Data with the Observer Pattern in PHP (
Page 1 of 4 )
Are you looking for an easygoing article that teaches you how to implement the Observer design pattern inside your PHP 5 applications? Your search is finished! Welcome to the last part of the series "The Observer Pattern in PHP." Made up of three articles, this series will show you how to create and work with observer objects, without making you scratch your head while looking at complex code samples.Introduction
For those of you who didn't (yet) read the previous installment of this series, let me explain quickly the topics it covered. To begin with, I gave an accessible explanation of what the Observer pattern is about, and accompanied all the corresponding theory with a straightforward practical example, to help you easily understand how to apply this popular design pattern in your own PHP 5 applications. I'm don't mean to say that you're going to grasp the logic of observer objects in no time, but I firmly believe that a simple example will help you out by pointing you in the right direction.
Provided that you already know what an observer object is, you'll realize that this pattern is indeed helpful for decoupling disparate objects from the rest of the application. Besides, the pattern will assist you in the development of programming mechanisms aimed at reflecting specific changes produced by several components at the application's core level. This is a highly desired feature, particularly if you're building PHP programs that require the implementation of truly independent objects.
Right, I hope the concepts that I touched on above are fresh in your mind now, because it's time to continue exploring the advantages of using the Observer pattern in PHP 5. Now, surely you're wondering: how does this story continue? Well, over the course of this last tutorial, I'll be moving the application of observer objects toward the real world, in this case by showing you how to include these objects within a set of form-validation classes. After reading this article, you should be equipped with a decent knowledge of how a form checking application can use the powerful features of this widely-known design pattern.
Having established the goals for this last installment of the series, it's time to continue learning about observer objects. Let's do it together!
| | Discuss Centralizing the Validation of Data with the Observer Pattern in PHP | | | | | | |
This last article of the series is focused on getting the form validation system... | | | | | | I have enjoyed all your articles and continue to read them. I tried to implement... | | | | | | Hello Cranium,
Thank you for your commenting on this PHP article. Concerning your... | | | | | | Thank you for replying back so quickly. I changed line 94 to what you showed, but... | | | | | | Hello again Cranium,
The error you're getting it's because the $_POST[$formVar]... | | | | | | Hi Alejandro,
I appreciate all you help on this. I changed the line to the... | | | | | | Hello again Cranium,
It seems that you're having additional problems with the... | | | | | | I have done some testing by watching the flow of the output and printing to screen. ... | | | | | | Hi Cranium again,
As I posted above, it's hard to see what's wrong with your... | | | | | | I sent to the e-mail that is listed when clicking on your name by an article; it is... | | | | | | Hi Scot,
I emailed you the solution.
Regards. | | | | | | Very good series again. Thanks! | | | | | | Hi friend,
Thank you for the kind comments om my PHP article.
Regards. | | | | | | In regards to the problem anonymous had before and your suggestion:
If you... | | | | | | Hello Matthijs agin,
Thank you for your feedback concerning this PHP article. The... | | | | | | Alejandro,
Thank you for authoring content that I would expect to see in a... | | | | | | Hello Larry,
I'd like to thank you for the compliments on my PHP article, as well... | | | | | | >>> Post your comment now! | | | | | |
|
 |