Book Review: Wicked Cool PHP
In the interest in full disclosure, I was sent this book by a fellow DZone Zone Leader in hopes that I would review it. I'm reviewing this book, however, in the interest of my audience.
Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems
William Steinmetz with Brian Ward
No Starch Press
PHP is an easy-to-use scripting language perfect for quickly creating the Web features you need. Once you know the basics of how the language works, wouldn't it be great to have a collection of useful scripts that solve those tricky problems and add interesting functionality to your site? We thought so, too.
Instead of starting at "Hello World," Wicked Cool PHP assumes that you're familiar with the language and jumps right into the good stuff. After you learn the FAQs of life-the most commonly wished for PHP scripts-you'll work your way through smart configuration options and the art of forms, all the way through to complex database-backed scripts.
Wicked Cool PHP contains a wide variety of scripts to process credit cards, check the validity of email addresses, template HTML, and serve dynamic images and text. The 76 easily implemented scripts will also teach you how to:
- Send and receive email notifications
- Track your visitors' behavior with cookies and sessions
- Override PHP's default settings
- Manipulate dates, images, and text on the fly
- Harness SOAP and other web services
- Create an online poll, ecard delivery system, and blog
But it's not all fun and games: Security is a big concern when programming any web application. So you'll learn how to encrypt your confidential data, safeguard your passwords, and prevent common cross-site-scripting attacks. And you'll learn how to customize all of the scripts to fit your own needs.
Dynamic Web content doesn't have to be difficult. Learn the secrets of the craft from two experienced PHP developers with Wicked Cool PHP.
One of the reasons that I prefer short tutorials and articles over programming books is that books generally give you five pages of theory and one page of actual code. Many times, they assume that the reader is a noob to the language (I understand that the publisher requires this and that it's not the author's fault). Not this book. Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems is a no-nonsense, "here's-the-code-here's-the-solution" type of book.
Wicked Cool PHP covers the basis of the most used facets of PHP: configuration, string manipulation, form validation, file handling, security, and more. Each code snippet is preceded by a short explanation as to the strategies used in the code. The code is presented very well and is easy to understand. Some code snippets are followed with candid explanations as to the disadvantages of using the given code.
Wicked Cool PHP also covers some little-discussed topics including cURL, PHP web services, and creating images with PHP. With web services becoming more and more popular every day (social networking and bookmarking APIs), the cURL and web services scripts in the book will be a great starting point for web service/XML noobs. Wicked Cool PHP wraps up with a few intermediate projects: creating a poll, e-greeting card, and basic blogging system.
Overall, Wicked Cool PHP is a solid, code-packed book for the rookie or intermediate-skilled PHP programmer that understands the basic principles of programming and security. The code provides real world problem/solution scenarios that every PHP programmer will need to know. The book also includes some less-known gems that will spark the inquisitiveness of the reader.
My only criticism of Wicked Cool PHP is that the "difficult problems" the book promises to solve aren't that difficult. The book covers strategies for keeping your web apps secure, using regular expressions, and session/cookie issues, but many other code snippets would be considered basic for any experienced PHP programmer. I would've liked to have seen topics like storing the session in a database, creating a basic MVC framework, and large form strategies.
My favorite chapter of Wicked Cool PHP is chapter five: Working with Text and HTML. Regular expressions are extremely powerful and the amount of information you can acquire from simple page scraping and processing is amazing. Chapter five shows the user how to scrape a XHTML document for links, substring replacement, and converting plain text into XHTML markup.
Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems is a wicked cool publication for rookie and novice PHP programmers. The collection of useful PHP scripts provided in Wicked Cool PHP can serve as a great library for a noob or a quick reference to fix the nagging issue plaguing a novice developer's web application. If you're looking for a book that's less theory and more straight-to-the-point code, Wicked Cool PHP belongs on your bookshelf.