In a first of a two-part series, Alejandro Gervasio introduces you to a lesser known pattern in PHP—the facade pattern. The tutorial explains how the facade pattern works with hands-on examples.
The tutorial begins by explaining the facade pattern, how it can be applied in situations where you need to create a PHP class that requires the implementation of a complex system as part of one of its methods. The advantage of using a facade schema relies on the point that the class can hide all the logic of the mentioned mechanism, while the mechanism in question knows nothing about the calling class.
Alejandro also describes how to use the facade pattern with PHP 5 using a web page generator class, with some functional examples.




