News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
DevShed:
The Active Record Pattern, Concluded
December 29, 2005 @ 10:03:27

DevShed has concluded their series on ActiveRecord today with This new post, the end of the chapter from php|architect's Guide to Design Patterns.

This article, the second of two parts, helps you use design patterns to better organize how your web application interacts with a database. It is excerpted from chapter 14 of the book php|architect's Guide to PHP Design Patterns, written by Jason E. Sweat.

Databases usually just work, but failure is not unheard of. To make sure your code operates correctly under failure conditions, let's simulate a failure using a Mock Object, which stands in for the connection object.

They create the mock object and use it to test the ActiceRecord instance, including (as before) the unit testing code as well. They finish it off with examples of how to search for records and update the records that already exist.

0 comments voice your opinion now!
php activerecord mock object database search update php activerecord mock object database search update



Similar Posts

Skaldrom Sarg's Blog: PHP-UWA Widget Library

Tobias Schlitt\'s Blog: eZ Components and PEAR

The PHP Blog: Writing a Pastebin in PHP

NETTUTS.com: Real-World OOP With PHP and MySQL

Davey Shafik\'s Blog: php|tek Day 2


Community Events









Don't see your event here?
Let us know!


PHP5 zend zendframework job releases application developer database ajax release package code book example security PEAR mysql cakephp conference framework

All content copyright, 2009 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework