Yesterday I received "PHP Design Patterns", the new book written by Stephan Schmidt, a well-known PHP community member and creator of cool library packages, like most of the PEAR XML section. I seized the time on the tram yesterday night to take a look at it and I have to admit I'm quite impressed. Stephan managed to write down a lot of practical experience in respect to the implementation of OO patterns with PHP.
The book is really well structures and I can only recommend it to everyone who wants to learn more on good OO development with PHP. Stephan first presents the new OO features of PHP 5 (based on 5.1), including overloading and some SPL stuff. The second chapter introduces basic OO design concepts to the reader and makes him familiar with basic UML. After that, Stephan starts the real topic. Chapter 3 deals with generation patters like Singleton and Factory. The following part has structural patterns as the topic and contains patterns like Composite, Decorator and Proxy. For each of these patterns Stephan explains the sense behind it and its purpose. Additionally he gives a practical example of how an implementation could look like, for a specific use case. Chapter 5 deals with behavior patterns, as there are Subject/Observer, Visitor, Iterator and some more, in the same way. The next section is named "Enterprise Patterns" and consists of 2 chapters. The first of those (chapter 6 "Data View and Business Logic") introduces the tier model for application and presents patterns used on the data level, like Active Record and Registry, as well as for implementing business logic (Domain Model). The second part (chapter 7 "Presentation Tier") goes into detail on e.g. Front Controller, Event Dispatcher and Template View.
All in all I really enjoyed digging into the parts I already read and I expect the rest to be as well as those. While some books only touch the theory of design patterns and avoid giving practical examples to the user, Stephan manages very good to combine both.
I want to recommend this book to everyone who is not absolutely familiar with OO development in PHP or who comes from another OO language into PHP development. It can really give you some highly important knowledge on object oriented design patterns and on good OO development in PHP. Beside that, it can give every OO developer from other languages a nice overview and reference on how the well-known patterns are implemented in PHP in contrast to e.g. Java or C#.
Great work, Stephan!
Now if we can get O'Reilly to publish it in English so those that aren't fluent in German can enjoy it as well.
Link to comment
Like Jay Keith, I'm waiting for an English version of this new book. It may be able to answer the most burning question I have about design patterns in PHP.
I've seen dozens of PHP design patterns, but all of their violate the first principle of design patterns—program to an interface and not an implementation.
How is that possible with a non-typed language like PHP? I'd be interested in any source that has an answer to that question.
Like Jay Keith, I'm waiting for an English version of this new book. It may be able to answer the most burning question I have about design patterns in PHP.
I've seen dozens of PHP design patterns, but all of their violate the first principle of design patterns—program to an interface and not an implementation.
How is that possible with a non-typed language like PHP? I'd be interested in any source that has an answer to that question.
sir actually i want to ask u that will be php language good for me or not i have completed my 'O' level and pursuing 'A' level from DOEACC society i wants to make my future very bright pleasr u tell me that what course will be beneficial for me this course will be good for me or not
Link to commentFields with bold names are mandatory.
[??] PHP Design Patterns
<p>???????????????...</p>rn<p>?...????????????????<a href="http://schlitt.info/applications/blog/index.php?/archives/500-Reading-recommendation-PHP-Design-Patterns.html">Reading recommend
Design Patterns by Mind Map
I tried mind mapping of "Design Patterns" by GoF.Colors and shapes strongly stimulate the right hemisphere of the cortex, and support human memory capability.In this experiment, I used a new feature of JUDE/Professional 3.1 which adds a name to a link(dashed line between topics) to illustrate relationships between the patterns.Get an evaluation license(if you don't have one), and try JUDE/Professional.http://jude.change-vision.com/jude-web/product/profess...