Book Review – PHP Programming with PEAR

February 2, 2007

Uncategorized

p. !

p. PHP Programming with PEAR, written by Stephen Schmidt, Carsten Lucke, Stoyan Stefanov and “Aaron Wormus”:http://www.wormus.com/aaron/, takes a look at some important “PEAR”:http://pear.php.net classes and how you can use them. The classes reviewed are:

*(disc) “File_PDF”:http://pear.php.net/package/File_PDF
* “HTML_Table”:http://pear.php.net/package/HTML_Table
* “MDB2″:http://pear.php.net/package/MDB2
* “PEAR::Date”:http://pear.php.net/package/Date
* “Services_Amazon”:http://pear.php.net/package/Services_Amazon
* “Services_Google”:http://pear.php.net/package/Services_Google
* “Services_Technorati”:http://pear.php.net/package/Services_Technorati
* “Services_Webservice”:http://pear.php.net/package/Services_Webservice
* “XML_Beautifier”:http://pear.php.net/package/XML_Beautifier
* “XML_FastCreate”:http://pear.php.net/package/XML_FastCreate
* “XML_Parser”:http://pear.php.net/package/XML_Parser
* “XML_RPC”:http://pear.php.net/package/XML_RPC
* “XML_RSS”:http://pear.php.net/package/XML_RSS
* “XML_Serializer”:http://pear.php.net/package/XML_Serializer
* “XML_Util”:http://pear.php.net/package/XML_Util
* “XML_XUL”:http://pear.php.net/package/XML_XUL

p. Granted, these are but a small subsection of PEAR but it would have been nearly impossible to devote the coverage these classes get to every class in PEAR. (Not to mention all the channels that are not directly listed on the PEAR page.

p. The authors do a good job though, of showing off the classes they do review with sample code. Chapter 3, “Working with XML” was particularly interesting to me. It covered more classes than the others but it still managed to give clearly understandable samples of use without filling the book with reams of source code.

p. XML is a large topic and there are a lot of classes covered in Chapter 3. The end result is that you get a feel for each class, you get some of sample code showing an example of how it can be used but in most cases you don’t get a lot of hand-holding or depth. By this I mean the author expect you to already be familiar with the concepts he’s discussing. If you are new to XML, you might want to research and understand XML before you dive into using the PEAR classes.

p. Chapter 1, MDB2, is the opposite. Since it’s dedicated to a single class, you get a much more in depth review of the class, the parameters and methods available to you and the ramifications of each. As with the other chapters, you get good sample code but it doesn’t overwhelm you.

p. I think my favorite chapter though was Chapter 4, Web Services. Not because it stood out as being better than the other four, it’s just that the subject matter was interesting to me. The author assumes that the reader understands what web services are and why they are useful. Spending a scant page on explaining why you should want to build and consume web services, he then goes on to show examples of how you can consume popular web services. (Google, Amazon, Technorati) The author explains briefly the differences between REST, SOAP and XML-RPC. The last section of the chapter shows you how to offer up your own web service.

p. Overall, this is a good book. One pleasant surprise was the consistency in the writing style. Given that there are three authors, I expected three different writing styles. The editors did an excellent job of enforcing a consistent style throughout the book. If you are new to PEAR, this is a good book to get you going. If you’ve done work with PEAR already, the usefulness may be limited unless one of the reviewed packages is of particular interest to you. It’s a short book, with five chapters and index spanning only 277 pages.

p. =C=

,

About Cal Evans

Many moons ago, at the tender age of 14, Cal touched his first computer. (We're using the term "computer" loosely here, it was a TRS-80 Model 1) Since then his life has never been the same. He graduated from TRS-80s to Commodores and eventually to IBM PC's. For the past 10 years Cal has worked with PHP and MySQL on Linux OSX, and when necessary, Windows. He has built on a variety of projects ranging in size from simple web pages to multi-million dollar web applications. When not banging his head on his monitor, attempting a blood sacrifice to get a particular piece of code working, he enjoys building and managing development teams using his widely imitated but never patented management style of "management by wandering around". Cal is currently based in Nashville, TN and is gainfully unemployed as the Chief Marketing Officer of Blue Parabola, LLC. Cal is happily married to wife 1.28, the lovely and talented Kathy. Together they have 2 kids who were both bright enough not to pursue a career in IT. Cal blogs at http://blog.calevans.com and is the founder and host of Day Camp 4 Developers

View all posts by Cal Evans

One Response to “Book Review – PHP Programming with PEAR”

  1. _____anonymous_____ Says:

    test