Aided by three key object fundamentals, design principles, and best practices, you'll learn how to develop elegant and rock solid systems using PHP.The 5th edition of this popular book has been fully updated for PHP 7, including replacing the PEAR package manager with Composer, and new material on Vagrant and PHP standards. It provides a solid grounding in PHP's support for objects, it builds on this foundation to instill core principles of software design and then covers the tools and practices needed to develop, test and deploy robust code.PHP Objects, Patterns, and Practice begins by covering PHP's object-oriented features. It introduces key topics including class declaration, inheritance, reflection and much more.The next section is devoted to design patterns. It explains the principles that make patterns powerful. The book covers many of the classic design patterns and includes chapters on enterprise and database patterns.The last segment of the book covers the tools and practices that can help turn great code into a successful project. The section shows how to manage multiple developers and releases with git, how to manage builds and dependencies with Composer. It also explores strategies for automated testing and continuous integration. What You'll LearnWork with object writing classes and methods, instantiating objects, creating powerful class hierarchies using inheritance.Master advanced object-oriented features, including static methods and properties, managing error conditions with exceptions, and creating abstract classes and interfaces.Learn about the new object-oriented features introduced by PHP 7 and why they matter for your code.Understand and use design principles to deploy objects and classes effectively in your projects.Discover a set of powerful patterns that you can deploy in your own projects.Guarantee a successful project including unit testing; version control, build, installation and package management; and continuous integration.Who This Book is ForThis book is suitable for anyone with at least a basic knowledge of PHP who wants to use its object-oriented features in their projects. Those who already know their interfaces from their abstracts may well still find it hard to use these features in their systems. They will benefit from the book's emphasis on design. They will learn how to choose and combine the participants of a system; how to read design patterns and how to use them in their code. Finally this book is for PHP coders who want to learn about the practices and tools (version control, testing, continuous integration, etc) that can make projects safe, elegant and stable.
I've tried to read this book just when I started with backend programming, it was a very accessible read, although everything was so new to me that I could not assimilate half of it's content. I dropped this book because I felt too overwhelmed with information, but it was a good basis. Every so often this book and its examples came to my mind while working with different php frameworks, so I decided to give it another shot a few years later. I was surprised how easy all the content came to me, it was a pleasant reading and a lot of concepts came every easily.
II would recommend this book for everyone, from novices to experienced programmers. For novices I would recommend the first part, that gives a very good introduction to object oriented programming. Experienced programmers will find more useful the second and third part, where it gives you a good introduction to UML and PEAR, also a good overview on patters and good coding practices.
Overall, this is a very good book. It covers lots of design pattern and the chapter about OOP is excellent.
The only problem I found is that some code examples are hard to follow, specially those in chapter 12 and 13. For that reason, this book should be read by experienced php programmers.
In this book reviewed less than half of common patterns and, in my opinion, sometimes author selected not the best examples. In addition, some of the described tools/libraries are really outdated and can not be recommended for usage, for example, Phing.
This book, being first released in 2007, is a timeless piece and valuable for different reasons. It is the ultimate representative for PHP in the Patterns series for programming languages. Giving a strong introduction to object-oriented programming and then bridging over to the Patterns. Technically difficult parts are the Enterprise and Database architecture chapters in the middle part. These are really advanced and I can't say that I took something away from it. There, starting from the WOO example: a program to organized Venues, Spaces, Events the author builds a Framework, introducing components as Registry, Mappers, etc you would also find in modern PHP frameworks like Symfony or Doctrine. So it would be best to re-read this part if one is experienced with a framework. I enjoyed the last part where he introduces the ecosystem: PHPUnit, PEAR, Git, Phing, Jenkins with a simple sample application at hand which was fun to follow.I recommend to read this book after maybe one year of programming excercise in PHP and after having a detailed glimpse at the architecture of frameworks or CMS solutions based on PHP (and perhaps MySQL).
Il miglior libro che abbia letto finora sulla programmazione a oggetti in PHP. Spiega molto bene i motivi per cui si usa la OOP, affronta bene i pattern e porta molti esempi pratici, adattando i pattern classici, molti dei quali pensati per linguaggi statici, alle caratteristiche di un linguaggio dinamico come PHP. Tratta anche delle nuove caratteristiche introdotte in PHP 5.3 (namespace e anonymouse functions principalmente) e ne mostra gli utilizzi pratici. Tra i possibili difetti: - ho trovato un po' fumoso il capitolo sugli Enterprise Patterns, forse perché per molti di loro non ho mai visto una necessità reale nei progetti che ho gestito. - tratta abbastanza bene lo unit testing, ma è carente per quanto riguarda integration testing, ed è un po' stringato riguardo la Continuous Integration. Dà comunque delle buone basi su cui approfondire gli argomenti.
Прочитал 3 и 4 издание этой книги. Замечательная книга, но начинать с неё знакомство с PHP не рекомендую. В книге подробно не разжёвываются значения встроенных функций и некоторые конструкции языка. для начала лучше изучить PHP 5. Сам начинал углублённое знакомство с PHP с неё, после ~70 страницы стал недопонимать некоторые выражения. Вернулся к книге PHP 5 и после снова к этой. Уже всё стало понятно. После прочтения, сразу вышло 4е издание. Постепенно прочитал его, уже понял значительно больше, и думаю ещё не раз к ней вернусь для справки. Между 3 и 4м издание больших отличий не заметил, не критично.
One of the best books you can read to improve your knowledge about PHP OOP and Design Patterns especially MVC design pattern, it helps you understand how popular php frameworks work and with some additional effort, you can start developing your own framework, it's really a brilliant book and shift my knowledge to great extent.
I'm waiting for the fifth edition to know how the author extend the code to include the new features PHP offered since the book have been published.
if you have a basic knowledge about OOP and can't develop using it/can't choose your classes/ can't understand what is OOP all about and how it differs from procedural programming and the usefulness it provides to programming world, this book will help you get the real purpose of OOP.
Excellent book for those coming from traditional object oriented languages like C++ or Java. It shows that PHP, though coming from a procedural legacy, now has significant and serious object oriented capabilities and so can be used in a disciplined and productive manner if one chooses to do so. The book provides many of the perspectives and instruction to make this transition to object oriented PHP easier and more enjoyable. This is easily my favorite book for thinking about PHP in an object oriented manner.
It was a good start for me - before this book I was writing procedural code and was even afraid to create "too much objects". This book's set me free from this fear and I started experimenting, and I feel grateful because of this. I would not recommend it to anyone who's at the very beginning in programming or who doesn't know PHP, but it's definitely a way to go into object-oriented programming in PHP after one is comfortable with the language itself.
Very clear book on the object-oriented aspects of PHP. This book changed my perception of PHP from that of a web scripting language to that of a genuine programming language. I would highly recommend it to the intermediate PHP programmer.
It's an excellent resource for someone who's starting to program in php or want to improve their programming skills, however many implementation of design patterns can be confusing. The unit testing chapter is excellent and in overall the book will guide you through common practices and tools.
The examples are a little hard to follow and I think the book could benefit from an extended case study or two. Overall though, good intro to PHP OOP with design patterns.