Archive for March 6th, 2007

Cal Evans’ Blog: My First Mashup Slides and Code

Attendees at this year’s PHP UK Conference were able to listen to Cal Evans’ talk about mashups in PHP - now everyone can check out his slides:

Ok after procrastinating a week, I’ve finally gotten around to posting my slides and sample code for my presentation at PHPUK, “My First Mashup”.

He has the file offered in both a zip format and in a tarball.

Continue Reading · Add comment

Validating User Input with the Strategy Pattern

The strategy design pattern is applied much more often than you might think so if you want to find out how to implement it with PHP 5 this article should guide you through the whole learning process. Welcome to the final installment of the series A quick look at the strategy pattern. In two parts this series walks you through the key points of how the strategy pattern works and accompanies its theoretical concepts with copious hands-on examples….

Rackspace: Save on Web Hosting in March! Start working with The Hosting Experts today and Save - Get Free Setup in March!

Continue Reading · Add comment

Zend Developer Zone: PHP in Action - Chapter 7, Design Patterns. Part - III

The Zend Developer Zone has posted the final part of their excerpts from the Manning Publishing book “PHP in Action” today with part three of the Design Patterns chapter.

You know you’ve been waiting for it, here it is. The final installment of Chapter 7 of PHP in Action by Dagfinn Reiersol. Without further comment, here’s the introduction to this section in Dagfinn’s own words: “In this section we discuss an Iterator and a Composite.”

Dagfinn briefly mentions what the two patterns are about - a “canned loop” and making tree structures easy. Check out the PDF for the remainder of the chapter.

Continue Reading · Add comment

WebReference.com: Building a Weblog: Part 4

WebReference.com has posted part four (the final installment) of their “Building a Weblog” series today, focusing on creating the categories for the posts, adding a new entry, and updating a current one.

First off is the creation of the categories script - just a simple little page that takes in the category name (from a form) and inserts it into the categories table in the database. The next form functions in basically the same way, but handles more information. It lets you write and save a new blog entry to the database.

Finally, since everyone makes mistakes, they include a sample script to let you update one of your already posted blog entries, using the same kind of form you used to enter it.

Continue Reading · Add comment

Spindrop.us: PHP double versus single quotes

In a new post on the Spindrop.us site today, Dave Dash takes a look at the differences between using single quotes and double quotes in your applications.

I’ve been indoctrinated with the “use single quotes whenever possible” methodology, but I never really put it to the test. Is it really worth it for me to go back and look at old code that uses double quotes and change them? Like all best practices, the answer is “maybe.”

To show his point, he whipped up some simple tests to get the results of using double quotes and appending, using double quotes with the variable inside, and using single quotes and appending. His results showed that the first option was the fastest, not the one with single quotes.

Continue Reading · Add comment