Нашли опечатку? Выделите ее мышкой и нажмите Ctrl+Enter
Название: Object-Oriented PHP: Concepts, Techniques, and Code
Автор: Lavin P.
I have used PHP procedurally for several years, and had some inkling of OOP, but no formal introduction yet. I was happy with the three introductory chapters laying the groundwork for the body of the book. I was also able to implement the classes developed as examples in this book with some added/modified methods. The author is a highly talented programmer and gives the reader an insight into his use and development of meaningful classes. The back cover presents this effort as an introduction to Object Oriented Programming, and fair enough, the concepts are clear. The summary also presents this as an 'easy to follow' guide to OO PHP. Not. It is one thing to sit in your recliner and read text and say, "Uh huh. Got it" and quite another to actually understand how to build the examples and implement them so that your time is not wasted.
It is possible to use this book to learn OO PHP, but only with great willingness to search far and wide for supporting documentation to items mysteriously introduced without explanation. I seriously doubt any reviewer that rated this effort highly, stepped through the code line by line, chapter by chapter, entering their own programming notes into their code and understanding each step.
For me, the time required to research all of the items introduced in each chapter to the point of knowing the 'why' of each step was excessive. A specific example of an item being introduced without proper explanation is the introduction of the 'Iterator' interface in Chapter 10. There is no mention that interfaces are part of the Standard PHP Library (SPL), or that the Iterator functions are listed there. At least, in the context of the chapter, that is how it read to me. No explanation of how we know the behaviors or properties. I found myself digging into PHP's C/C++ source code to understand subjects glossed over in the text of the book. Further reading at the end of Ch. 11, almost two chapters later, then referenced the fact that Iterator was a built-in function and where to find the info. A little deeper digging reveals that in fact, reference was made in one of the introductory chapters, ch. 3, p.14. The 'we won't deal with the details here, but the download files have the proper code' or the information is somewhere else does not seem reader friendly. This is the default method in this book, making it frustrating to extract the knowledge in a meaningful, time effective way.
I guess I have become spoiled to the books written by author Larry Ullman and hold other instructional texts to that standard. If Ullman introduces a concept, he covers the details and has every line of code actually IN the text of the book. The process of actually including the code, not just highlight snippets, evidently causes a more thorough thought process on the part of the author and results in clear, easily understood explanations rather than opaque references to behaviors and definitions that the reader must seek out.
It is great accomplishment just to write a book, and I am grateful to all authors and this one in particular for sharing his knowledge. The style of reading required, i.e. reading pseudo 'back to front' in various sections was somewhat disconcerting. My view is that if you already know Object Oriented Programming and probably already know PHP OOP and have a thorough knowledge of the SPL, this is a great resource. I believe if this book were re-packaged so that expectations for the content were different, it would be a 5-star book. The knowledge gained from stepping through is useful and lasting, and expensive time-wise.