Archive for July, 2008

Heigh-ho, it’s off to print we go

I got word from the production manager of my latest book, PHP Object-Oriented Solutions, that everything has gone to schedule, and the book shipped to the printers just before the weekend. It usually takes about three weeks after sending all the chapters and images to the printers before a book appears on the shelves in bookstores. I’m told that 18 August is now the official publication date. The eBook version should be ready about a week earlier (a link will appear on the book’s page on the friends of ED site as soon as it’s available).

I’m quite pleased with the way the book has turned out. Well, I would be, wouldn’t I? ;)

It’s aimed at readers who already have a good understanding of PHP, but it doesn’t assume any prior knowledge of object-oriented programming (OOP). Although the book is devoted entirely to OOP in PHP, it makes the point right from the start that OOP isn’t a replacement for everything that you have already learned, but an extra, very powerful tool to add to your skillset. The book concentrates on a small number of custom-built classes that can be reused in a variety of projects. It also uses some of the built-in classes, such as DateTime, DateTimezone, SimpleXMLElement, and XMLWriter.

One chapter that turned into a voyage of discovery for me deals with the Standard PHP Library (SPL). Even though SPL has been part of PHP for more than four years, the documentation is difficult to follow. Once I peeled away the mysteries of the various iterators, I realized just how powerful they are. An iterator lets you use a foreach loop on an object, which is pretty useful in itself; but what makes iterators really useful is the way you can combine them. For example, I used a DirectoryIterator in combination with a RegexIterator and a LimitIterator to display a long list of images in a folder just ten at a time. Without SPL, it would have taken a lot of code. With SPL, just half a dozen lines.

PHP Object-Oriented Solutions is exclusively focused on PHP 5 (and ready for PHP 6 when it eventually emerges). The code will not work with PHP 4.

21 comments July 29th, 2008

Special deal on friends of ED eBooks

friends of ED has created what it calls its Summer ‘08 Hotlist—seven eBooks that are being offered at 25% off the usual price. One of them is my PHP Solutions: Dynamic Web Design Made Easy, which is currently being offered for $18.37. To benefit from the special price, you need to use the links on the friends of ED summer hotlist page. A similar deal is being offered on 30 Apress eBooks, including Practical Web 2.0 Applications with PHP by Quentin Zervaas. I’m roughly halfway through the book, and it’s really excellent—although you need a solid knowledge of PHP and web design before tackling it. The promotion continues till November. If only summer would last that long! ;)

4 comments July 29th, 2008


Calendar

July 2008
M T W T F S S
« Jun   Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  

Posts by Month

Posts by Category