Datasheet
Chapter 1: Understanding Design Patterns
9
Why Use Design Patterns in PHP?
PHP has a very easy beginner ’ s learning curve with the backing of an enterprise - ready engine. Chances
are that you ventured into PHP by inserting a few lines of code into an existing HTML document. Simply
change the extension from
.html to .php , add your quick snippet of code, deploy it to a PHP server, and
you ’ re a bona - fide PHP programmer. Up until the advent of the Zend Certified Engineer (ZCE)
certification, there was no real measurement of a PHP programmer ’ s prowess. Even after becoming a
ZCE, programmers can still lack some of the essentials for developing enterprise - ready, architecturally
sound application software.
As if the example in the beginning of the chapter weren ’ t enough encouragement, more business - class
players are coming on board with PHP. PHP ’ s humble roots have left it somewhat devoid of the
limelight of major enterprise - level programming languages. However, the hard work of Zend as well as
the adoption of PHP by large Internet companies (such as Yahoo! and Amazon) has shown that PHP is
enterprise ready. With the introduction of enterprise - level software requirements, enterprise - level
methodology is to follow.
PHP now has support for a lot of the building blocks behind the concepts you ’ re going to study. Perhaps
during the era of PHP3 or PHP/FI, applying these styles of patterns may have been more difficult if not
impossible. Don ’ t get me wrong; there are always patterns in language; it ’ s just that this book and its
examples wouldn ’ t have been nearly as useful!
Summary
This chapter discussed the prevalence of patterns in your normal programming by using an everyday
programming example. By extending your understanding of patterns, you can make correlations to
actual Design Patterns. Examining the realm that Design Patterns encompass, and what they do not,
provided a more concise definition. Finally, the case was made for using Design Patterns in PHP by
pointing out PHP ’ s support for building base Design Patterns as well as mentioning PHP ’ s position
among some of the greater enterprise partners.
Now that you have an understanding of what Design Patterns are, let ’ s move on to discovering what
PHP already has available to help you out.
c01.indd 9c01.indd 9 7/17/09 12:17:46 PM7/17/09 12:17:46 PM