Book Review: PHP Solutions
In my quest to expand my knowledge of the web industry, I knew I needed to understand more PHP. PHP is one of the (if not the) most popular languages used on the web today. I had been exposed to it a little, and I have experience with other C-ish syntax languages, but I needed to brush up on the fundamentals and the unique qualities of PHP.
I chose PHP Solutions: Dynamic Web Design Made Easy because I wanted to have some real-world projects to play with as I learned the language, as opposed to just the dry information. The book delivered in that respect. As per the name, the book focuses on specific needs and solutions for those needs using PHP and MySQL. I got to see how PHP works with forms and databases, and how these techniques could be applied in a simple database-driven blog, for example.
However, probably the most useful part of the book for me were the tutorials on getting the Apache server, PHP and MySQL running on my local machine so that I could just jump into a code editor and start playing around. I actually ended up skipping to these two chapters (one for Apache/PHP and one for MySQL) and then put the book down for a month or so before I picked it back up and finished reading it.
I started out by following along with the solutions and the code samples, typing them in and trying it out as I was reading, but soon realized that this was unnecessary. I finished reading the better part of the book by simply reading and understand the code examples. Whether this is a good thing or bad is up for debate. It means the writing was clear, but also that the content was less challenging.
Besides the setup chapters mentioned above, the other most useful takeaway I had from this book was all the little things about the language that I mentioned above. Things like “the truth according to PHP” (“false” evaluates to true because of type coercion), how the $_POST and $_GET superglobal arrays work, and other little things that really help put it all together in my head.
Another very useful aspect to the way the solutions in the book are constructed is the focus on security and thoroughness. Some books leave out details, only hinting at it with phrases like “in a real application, we’d check this or that”, but in this book we are treated to some very useful (and usually very simple) techniques to make sure the code we’re building is secure and bulletproof.
All in all, I’m glad I now have the information I gained from this book, but I’m not sure it was exactly what I was looking for. As with other introductory-level books, I found myself a bit annoyed by the “if that last part made your head explode, don’t worry, just copy the code and know that it works” -type attitude. My head didn’t explode – on the contrary, that was one part where my brain actually felt that tingle of a concept falling into place.
Most of the book was spent thinking to myself, “yeah, I get it. OK. What’s next?” I think I would recommend this book to others, but only if you’re newer to programming in general, and have very little or no PHP experience. For me, with quite a bit of general programming, and some hands-on PHP experience from working with WordPress themes, it just felt a little bit too slow, but it did fill in some crucial gaps in my knowledge.