Rating: Summary: "A few cool programming tricks with PHP." Review: When ordering this book, I expected it to contain one of the two things: a PHP language reference with examples, or a discussion of problems in web application development with an explanation of PHP approach to their solutions. Instead, I received a book that should have been titled "A few cool programming tricks with PHP". The biggest problem of the book is trying to cover too many general web- and programming-related concepts and failing to cover any of them in sufficient detail. As a result, advanced readers will get little beyond a few cool tips, and intermediate and beginning readers may not get enough information to actually use the concept. It seems like the authors picked several topics that they liked, and showed some neat tricks, without much regard for comprehensiveness or completeness.Chapter 1, "Development concepts", has nothing to do with PHP, and adds little value. The topic is much better covered by "Code complete" by McConnell and "The practice of programming" by Kernigan and Pike. Chapter 2, "Advanced syntax", touches on several small aspects of PHP syntax, and several selected data structures (linked lists and assosiative arrays). Since PHP does not present any difficulties in expressing these data structures compared to other programming languages, I didn't understand why those data structures were chosen here. The chapter also has an interesting example of self-modifying code (actually, dynamic code evaluation at run-time, which is not an unexpected feature for an interpreted language), and then warns "The technique used here ... should never be used like this in production scripts." Chapter 3, "Application Design: A real-life example" presents a PHP-based IRC char server. Although authors show several interesting programming tricks, this is not a type of application one would consider "typical" for PHP. Interesting, but hardly useful. Chapter 4, "Web application concepts", condenses together HTTP and sessions, secutiry, and usability in about 45 pages. Chapter 5, "Basic web application strategies", touches on "PHP normal form" (basic layout of a PHP script), project layout, CVS, and three-tiered applications. Again, if you are not familiar with the concepts, you risk not grasping the discussion. Chapter 6, "Database access with PHP", covers PHPLib (I would expect a chapter on different database drivers avaiable for PHP). The chapter describes database abstraction and authentication used in PHPLib, but offers little practical advice. Read PHPlib online documentation instead. Chapter 7, "Cutting-edge applications", offers some advice on parsing XML and using WDDX. Chapter 8, "Case studies", offers a look at several commercial high-traffic sites that utilize PHP. The jist of all case studies is "we used it and it worked", although they include statements that will raise some eyebrows. BizChek.com case study says that PHP was selected over mod_perl because "BizChek developers felt that [mod_perl] might be lacking in dealing with high-volume Web applications". And MarketPlayer.com chose PHP because "most of the company was comfortable using WYSIWYG applications for Web development". I never thought of PHP as a "WYSIWYG" application. Chapter 9, "Hacking the PHP core" is only truly useful for people who intend to contribute to PHP development, and I flipped through it very quickly. Overall, the book is a good and entertaining reading written on a high professional level, but it definitely is not a reference nor a textbook. If you are already familiar with the concepts discussed in the book, you will find little new information. And if the concepts are new to you, you may be better off learning them elsewhere.
Rating: Summary: You may love or hate this book Review: You may love or hate this book, since it's not the usual collection of code recipes, it's about application developing, methodologies and good coding practices. Heartily recommended, but only to advanced developers
|