PHP Hacks: Tips & Tools For Creating Dynamic Websites (Hacks) Reviews



Amazon.com Customer Reviews

Great resource - Review written on August 26, 2006
* * * *
Rating: 4 out of 5

If you've worked with PHP for a while, you probably already know some of the hacks in this book - I did. But it did give me several ideas and I definitely picked up some new tricks and tips from it, so it was worth the buy for me. I love the "hack" books - I always learn something new!
good examples and good source code... - Review written on August 14, 2006
* * * * *
Rating: 5 out of 5

This is a very real world book, and gives some good examples with accurate working source code.

The XML feed handling with Regular Expressions, I was able to put to good use within a matter of minutes.
Outstanding PHP Tips & Tricks Book - Review written on March 10, 2006
* * * * *
Rating: 5 out of 5
12 customers found this review helpful, 1 did not.

'PHP Hacks' by Jack Herrington truly is a book of hacks, tips, and tricks that I have found to be very useful. Covering 100 different ways to use PHP to perform a myriad of different tasks, this book covers many of the neat things that can be done to turn your web site from 'bland to grand' with little effort required!!

Some highlights of what this book will enable you to do with your PHP-based web site:

Create a skinnable interface
Add tabs to your web interface
Put an interactive spreadsheet on your page
Create drop down lists
Create dynamic menus for your site
Make a DHTML slideshow
Create an interactive calendar
Create thumbnail images
Read XML easily with regular expressions
Create RTF and Excel documents dynamically
Turn any object into an array
Create a login system for your web site

Aside from these top hacks/tips that I especially enjoyed, there is also time spent on better object oriented development with PHP, advice for testing your site out, and a whole myriad of other outstanding things you can do!

If you use PHP at your job and you want to tack on some more skills, you would be at a loss if you didn't pick up a copy of PHP Hacks.

***** HIGHLY RECOMMENDED
best PHP reference I have used, bar none - Review written on February 21, 2006
* * * * *
Rating: 5 out of 5
6 customers found this review helpful.

I've read at least a dozen books on web development with PHP. This book is the best, by far!

The good:
* Excellent coverage of elegant PHP for dealing with databases and XML
* Outstanding explanation of automated code generation (a must for professional PHP developers)
* Description (and code implementation) of how to use design patterns with PHP. Former J2EE guys will love this.
* High quality prose and clear descriptions. I did not find any grammatical or spelling errors.
* Light sense of humor (without the unnecessary banter that one finds in most "... for Dummies" books)

The bad:
* Nothing.

As a software developer of 10 years, I give this book my highest recommendation.
Useful For The Ideas It Offers; Graphics, Database and Testing Hacks - Review written on February 05, 2006
* * * *
Rating: 4 out of 5

I tried several of the hacks in this book and quickly scanned some others. It offers numerous ideas for dynamic web page presentation. Hack 11, "Put an Interactive Spreadsheet on Your Page", provides a fresh way to present tabular data in an Excel-like grid format, using a proprietary solution called ActiveWidgets. I downloaded the free version of the ActiveWidgets code and ran this hack. It is giving me ideas for how to present the kind of tabular data that might look good on a web page. At no cost, you can study a given bit of PHP code and decide for yourself if you can put it to further use.

I also tried Hack 10, "Send HTML Email". It works fine as stated, and for the first time I learned how to construct a multipart email. That is what prompted me to implement the hack, I have always wanted to do exactly this. I have some work to do with my sendmail mail transfer agent (MTA) software for this to work even better. The hack can be improved by showing how to avoid the problem of the MTA writing the wrong from and to email addresses and how to work around potential mail relaying issues. The bottom line, however, is that the code presented works as indicated.

I experimented with Hacks 4, "Build A Breadcrumb Trail", and 12, "Create Popup Hints". These work acceptably.

An exciting hack that I haven't tried yet is #44, "Scrape Web Pages For Data". I would like to use this one to scrape weather-related data from http://nws.noaa.gov/ for my zip code.

Another attention-getter are the hacks presented in Chapter 8, "Testing". I have not tried these hacks myself, but I think unit testing needs more attention in web pages that utilize heavy scripting, and I'll be sure to experiment with these hacks in two projects of my own that are currently ongoing. I definitely feel the need of automated testing.

Other good points about this book is that it offers hacks which cover graphics tricks such as implementing Scalable Vector Graphics (SVG). SVG deserves attention because the image renditions possible are stunning, and you can render them right now. Recent builds of Mozilla and Firefox support SVG natively and you do not need the Adobe plugin with these browsers. Author Herrington neglects to state this in Hack 28. When you see the graphical renditions you realize they are worth implementing in your PHP code.

I like the numerous screen shots the book provides. They offer a way to check my own results against what he suggests or shows are possible.

I would have given this book a 5 star rating if I had seen hacks that implement PHP Data Objects (PDO) with databases such as MySQL and SQLite. PDOs have been available in PHP for a long time now, I use them in most of my coding because they work so well and offer a cleaner interface to the database engine than the "traditional" PHP code taught in a lot of books. Likewise, there is a focus on PEAR programming, but in PHP version 6, which is now in development, there is no longer a default install of PEAR. Herrington also didn't test his Hacks code on different platforms. He appears to have settled on the Windows versions of Firefox 1.x, Apache server, and PHP. There is some reliance on Internet Explorer. I can see the results when I test his hacks in Mozilla and Firefox on the Linux OS. Indeed, it doesn't look like Herrington did extensive research for the book; otherwise he would have quickly learned that SVG is supported natively in Firefox. There is too much code printed, and not enough discussion about the code itself. I can download the example code easily enough; why print it at the expense of discussing it? The book index also needs improvement. You can see entries for "ActiveWidgets", for example, but not a related one for "widgets".

I ran all my tests of these hacks on Fedora Core 4 Linux, running MySQL 5.0.18, SQLite 3.2.x and higher, and development versions of PHP 6 available from http://snaps.php.net/ . I did not test these in Microsoft Windows XP.

This book belongs on your desk as you code PHP. I recommend studying it for the ideas it offers.
VERY VERY VERY HIGHLY RECOMMENDED FOR CREATING DYNAMIC WEB PAGES - Review written on February 05, 2006
* * * * *
Rating: 5 out of 5
5 customers found this review helpful.

Do you use Hypertext Preprocessor (PHP)--an open source, server-side, HTML embedded scripting language to create dynamic Web pages? If you do, this book is for you. Author Jack Herrington, has written an outstanding book that covers the entire PHP spectrum--offering hacks that are focusing on everything from HTML and Ajax to code generation and database-driven message queuing.

Herrington, begins by walking you through the basics of installing PHP and MySQL; as well as, using the Pear library. Then, he covers how to use HTML tricks in conjunction with PHP to jazz up your interface. The author continues by using the powerful combination of HTML, CSS, and JavaScript known as Dynamic HTML in conjunction with PHP to show just what you can do in a web browser. In addition, he shows a wide variety of methods that you can use to display data in a graphical form. The author also shows you how to make flexible database objects and even to build your database layer automatically using code generation. Then, the author takes the coverage of PHP up notch and discusses techniques that you can use to develop applications quickly and reliably. Next, he shows you how to use several design patterns to make better PHP applications. Next, the author covers testing techniques that will find bugs for you and continuously monitor the operation of your site. Then, he shows the use of different user interfaces to work with your PHP code. Finally, the author shows you how to use the fun stuff on the Web to monitor multiplayer games, use Google Maps in your applications, and much more.

This excellent book offers more than just canned solutions. It offers ideas and techniques that you can use in your own applications.
Don't buy this book! - Review written on February 01, 2006
*
Rating: 1 out of 5
5 customers found this review helpful, 27 did not.

Please don't buy this book - even not if you are a PHP beginner. The hacks in there are for beginners and even for them it's not worth buying the book.
The samples are just wrong, have security issues and are known by everyone that has ever coded seriously.

So save yourself some money and buy another book, but not this one... the first O'Reilly-book that's really bad.