Beginning PHP 5 and MySQL: From Novice to Professional


             PHP 5 is large step forward from earlier versions. When I first started playing around with it, I saw the release as a case of the Emperor's New Clothes. Then I recoded a script that I did in PHP4. It used XML. What was a long painful exercise in PHP4, was almost effortless in PHP 5. After having done a similar exercise in C# for ASP.NET, the light went on. PHP 5 isn't good-- it's great! PHP 5 is the ideal language for web development today. The conundrum: as an Open Source language, it doesn't have same level of support and documentation as the Microsoft supported languages. What you need is a good book to walk you through the coding concepts, to stand there as a language reference and to give you supplemental information on related topics: databases, security, installatation, To fill this role is "Beginning PHP 5 and MySQL From Novice to Professional" from Apress.
By : Mike DeWolfe

             If you've ever picked up a PHP book before, you'll find that the layout is pretty standard. Chapter 1 is the introduction. Ramus Lerdorf invented PHP as a forms interpreter. Yadda, yadda, yadda. It's good that it's there for the novices but I've read this so many times that I could write a short Lerdorf biography from memory. It outlines what makes PHP good. Then what makes PHP 5 great.
Chapter 2 has installation instructions. At the time of doing this review, I was working on a cantankerous website that had a gimped install of PHP 4-- the server has so messed up, PHP couldn't talk to MySQL under any library. I used this book as a reference to get into PHP 5. I followed the installation guidelienes from the book and found they did me little good. That's not a critical failing of this book. It just speaks to the linear nature of this part of the book. While there are installation options for the build and deployment of PHP, they aren't listed. They would have been handy.
Once you clear the introductory chapters, you move into information on PHP 5: the concepts and the specific functions. The strengthening of the role of classes in PHP 5 is very important and this book keeps that in focus. While the try-catch-throw concepts are covered, they are not emphasized. They are there, but the index neglects to reference them.
In fact, the index is generally weak. There are missing references to lots of material in the book. A trick I pull when I'm evaluating a book at a bookstore is to grab the book, go to the index and look for subjects that stump me or thrill me. If the index is lacking, the book goes back to the shelf. With this book, I had the chance to read it start to finish and found a lot of good stuff inside.
When I went through O'Reilly's "Learning PHP 5", new concepts like Try-Catch and method overloads were underlined and I didn't feel that "Beginning PHP 5 and MySQL" went as far down the road on those concepts.
A chapter on securing PHP has a lot of information that you could find on hardened PHP sites; but presented in a friendlier, more approachable way. With scripts and applications coming out using Smarty, the "Templating with Smarty" chapter is a handy to have reference. The Web services is also good, but it divurges into C# code. The author, W. Jason Gilmore, also does work with C# so he speaks with authority. Nevetheless, throwing it into a PHP5 book felt out of place.
After PHP, the books digs into MySQL. This is where I found the book to be its strongest. It examines the popular MySQL clients. It details how to secure MySQL. It goes into intimate detail about MySQL table types. It talks about transactions and shows quick examples of boilerplare MySQL query/PHP combos (like creating multi-page results.)
The source code from the book is available but I was hard pressed to find a reference to that resource in this book. Given how much material there is, not underlining the availability of the code is a misstep.
Overall, this is a worthwhile outting. It reminds me of the "Web Applications with PHP and MySQL" by O'Reilly, but updated; expanding and broadening in its approach to keep advanced users with the book.

Comments