The PEAR book
In case you've missed it - the PEAR book hit the streets! The exact title is "PHP Programming with PEAR" and it's co-written by Stephan Schmidt, Carsten Lucke, Aaron Wormus and yours truly. Aaron also put up a Wiki for book and PEAR-related updates, it's at thepearbook.com
I tried to put up a list of the packages and classes covered in the book, I've probably missed some classes, especially Date_* and Calendar_* ones, but I hope I got all the packages. Here goes (alphabetically) :
- Calendar
- Date
- Date_Holidays
- Date_Span
- Date_Timezone
- File_PDF
- HTML_Table
- HTML_Table_Matrix
- HTTP_Request
- MDB2
- MDB2_Schema
- Services_AmazonESC4
- Services_Ebay
- Services_Google
- Services_Technorati
- Services_Webservice
- Services_Yahoo_Search
- Spreadsheet_Excel_Writer
- Structures_DataGrid
- Structures_DataGrid_Column
- Structures_DataGrid_DataSource
- XML_Beautifier (mention)
- XML_FastCreate
- XML_Parser
- XML_RPC
- XML_RPC_Client
- XML_RPC_Message
- XML_RPC_Response
- XML_RPC_Server
- XML_RPC_Value
- XML_RSS
- XML_Serializer
- XML_Util
- XML_XUL
For more info on a package, you can consult the PEAR site and manual. Did you know that you can access a package's page by typing its name (case insensitive) in the URL after pear.php.net, like http://pear.php.net/mdb2_SCHEMA for example?
This entry was posted on Sunday, October 15th, 2006 and is filed under News/personal, PEAR. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Get notification for future posts: follow me on Twitter or subscribe to my RSS feed

October 15th, 2006 at 11:51 pm
Nice list Stoyan, I was wondering exactly what specific packages are covered, can I put that on the wiki?
October 16th, 2006 at 12:00 am
Sure, I was thinking of doing the same, only wondering where exactly
October 16th, 2006 at 1:11 am
What do you think about doing something like this (only partially completed)
http://www.thepearbook.com/pear-packages/
I am then linking that from the home page, and adding a bit of information (from the PEAR page) on each package.
If you think that’s a good way to present, then I’ll get the rest of the info and put it together
October 16th, 2006 at 7:49 am
Stoyan Stefanov’s Blog: The PEAR book…
…
October 16th, 2006 at 8:20 am
Looks good and I think it’s a very good idea to list details of what’s covered in the book! Only that not all items in the list are packages, so maybe we can group them. For example package Date, with sublist containing classes Date_Span and Date_Timezone, as they are not stand-alone packages, but are covered in the book and instantiated with
new. Same for a few XML_XUL_* classes (which I actually omitted in the list). You can start the list with format you choose and I can help adding details.October 17th, 2006 at 9:54 am
This looks like a great book and I will most probably order myself a copy… However, I would have liked to see articles about some IMHO more popular/important packages like e.g. “Auth”, “Mail”, “Cache/Cache_Lite”.
For interesting classes like “Live_User” there is also a lack of documentation on the PEAR site, so it would have been nice to see these packages in the book.
But otherwise: great work!
October 17th, 2006 at 10:30 am
True, Fabian, you’re right. This book is more centered around something like working with (and displaying of) data, hence the covered packages – MDB2, DataGrid, Excel, PDF, XML, Web services. But you’re right, PEAR can always use more documentation and how-to-s on popular and/or interesting packages.
October 19th, 2006 at 8:55 pm
Stoyan – You guys are ***SO*** cool! So, my link count is going up! Do you have any idea why? LOL! I am so enjoying it. Thanks, Stoyan, for taking me on your adventure!
Did you find the link I left on Seth Finklestein’s blog for your book? Seth linked to a silly little article I wrote on the Walmart fake bloggers ( http://tinyurl.com/y55lam – wow, huh? lol!).
So, I was reading his articles, which are, of course, amazing. He has an article about wanting to get *out* of the Wikipedia. So, in my comment, I mentioned your book and how Pear might be able to help him.
Hope everything is turning out great with your book! Talk to you later, Amy
October 20th, 2006 at 11:43 am
Stoyan – I meant to link you to Seth’s article on wikipedia where I mentioned your book. Not my silly article.
I am here testing out your coComment recommendation – way cool.
November 2nd, 2006 at 11:44 am
[...] So what I’ve been up to recently? Having a bit of a break, I guess. First, I’m not currently writing a book, after the last one for which I completed my chapter back in June. That’s some free time (There is a very exciting book project on the horizon though, we’ll see). Then, I’m not working so much on our new house. Now (August) that my family is back from Bulgaria, and the two little princesses are running around, it’s next to impossible to do any construction work, however small. [...]
November 27th, 2006 at 10:36 pm
Just bought your book. Great reading. But working with dates, I would have liked you to cover the conversion of dates from a timestamp in a database to the internationalized date for instance in a form and taking it back again. I think many developers struggle with precisely that aspect.
–
Lars Olesen
November 29th, 2006 at 1:01 am
Read more in your book, and learned a lot. However, it is to bad that you on page 39 where you just explained how to set a custom debug handler to mdb2 only mentions the idea to prefix every select statement with explain and not show how to do it. The custom error handler has little value as it doesn’t add anything to the standard error handler. Perhaps a blog post about it
November 29th, 2006 at 9:56 am
Thanks Lars! I’m glad you like the book.
As for the custom debug handler, I think there is an example that shows the value – the thing that counts how many times each query is executed. The example that I used is something I came up some time ago while doing performance optimizations on a site. Back then the project was using PEAR::DB and there were no custom debug handlers, so I had to hack its code a bit. When I tried MDB2, I liked the fact that you can do the same by using API provided by the package and without the need of modifying its code (easier for future updates, etc)
Thanks again for your kind words about the book, I’ll try to address both of your suggestions in blog posts.
November 29th, 2006 at 6:43 pm
Cannot wait to read more about the matters in your blog. You guys are brilliant
December 9th, 2006 at 4:01 pm
[...] This is a follow-up to Lars’ comment about the PEAR book. In the MDB2 chapter I showed an example how you can create custom debug handlers in MDB2 and then gave a suggestion about a useful application of this functionality for performance tuning. Basically the idea is that your custom debug handler collects all queries that are executed during the life of a given script. Then, once the script finishes execution, the debug handler reports the stats that it has collected. In the book, the example is how you count the number of times each distinct query is executed, this way you can spot problems caused by the OO abstraction. For example, say you have a come class Users that has a method loadUser(), which abstracts the database work. While debugging with the custom error handler, you might figure out that without noticing, you’re calling this method in a few places and it makes the same repeating query(queries) over and over again. So you can now optimize/cache results and so on. [...]
August 22nd, 2009 at 2:37 am
I has use your code from PHP Programming with PEAR, technorati cosmos. But there is a bug like this :
Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\pear\Technorati\tech.php on line 22
Please tell me how to fix it. Thank you.