Archive for January 23rd, 2007

The Bakery: Checking for duplicate records (unique record)

On The Bakery, there’s a new expanded tutorial (from this) that talks about how to check for duplicate records in your CakePHP model.

[Here’s how to] validate a form field (such as a user name field), both in add and edit form and make sure that the selected user name does not already exist in the database [via a] function repeated only once (in app/app_model.php).

The example model they give defines an isUnique method that essentially runs an automatic check (a count() call) on the table to see if the given information exists. The example Model, View, and Controller are all given.

Continue Reading · Add comment

Willliam Candillon’s Blog: phpAspect on Tour

Willliam Candillon has a (very) quick note for all of the phpAspect fans out there:

I will be performing a talk about phpAspect at Solution Linux 2007, the 31th january 2007 and a lightning talk at FOSDEM next month. I’m looking forward to collect your feedbacks, questions and suggestions about phpAspect!

The Solution Linux 2007 conference is happening in Paris from the 30th of January to the 1st of February. FOSDEM will be in Brussels, Belgium and is happening the 24th and 25th of February.

Continue Reading · Add comment

DevShed: Handling File Data with the Facade Pattern in PHP 5

DevShed has posted the last installment of their series looking at the use of the Facade design pattern. This time, they’re looking specifically at its use in handling file data for the items on the local file system.

I’m going to continue demonstrating the application of the facade pattern, this time by developing yet another illustrative application. It will take care of processing the contents of a selected data file in different ways.

They start from scratch with the development of the sample script - creating a simple class that implements the pattern, then modifying it to work as a string processor and finally pulling them together to read the data for a file and echo out the processed results.

Continue Reading · Add comment

Handling File Data with the Facade Pattern in PHP 5

Are you interested in learning the foundations of different structural patterns in PHP 5 If your answer is affirmative then you should start reading this article immediately Welcome to the last installment of the series Introducing the Facade Pattern in PHP 5. In two consecutive articles this series shows you how to create and use facade classes in PHP-based development environments….

Web Application Load Testing QTest is an advanced Load Testing and Web Application Performance Tool. Download the Full-version.

Continue Reading · Add comment

The Bakery: RESTful Web Services With CakePHP

In this new post from The Bakery there’s a tutorial on creating a REST web service with the help of the CakePHP framework:

This is an example used to request the list of countries from you database to share among many applications (I use it to have consistant set of country_id’s among a couple of different applications that all share the same database back end: REALBasic Application, Aperture Plug-in and a CakePHP web application)

They provide the code (and settings) you’ll need to use to get the REST web service going. They create both a component and a helper to make the process easier and provide a SQL dump for the countries table and the Model, Controller and View templates you’ll need.

Continue Reading · Add comment