Introduction Having already introduced the subject of this series of articles, let me step back quickly to the second tutorial to refresh your memory of the topics it covered. As you'll certainly recall, I demonstrated how one of the main pillars of object-oriented programming, that is polymorphism, can be used to generate dynamic web pages with minor hassles. As you learned in that article, building basic web documents by using the functionality provided by a few polymorphic classes can be very useful, since this approach allows you to declare, for instance, one method that is shared by different sub classes, and define programmatically what kind of operations should be performed by the method in question. In essence, the previous schema illustrates in a nutshell how polymorphism works, since this model demonstrates how different objects that belong to the same family can behave differently using an identical method. Of course, this capacity was applied to building dynamic web pages, but it can also be used in other cases, such as developing database abstraction classes, generating online forms, and so forth. Speaking of the numerous situations where Polymorphism can be implemented successfully to build more efficient object-based programs, in this final installment of the series I'm going to show you how to develop an expandable PHP mechanism for validating different types of incoming data. This will demonstrate how this important pillar of object-oriented programming can be used with a plethora of applications. So are you ready to learn how to use polymorphism for checking user-provided data? Okay, let's get started!
blog comments powered by Disqus |