News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
DevShed:
Decoupling the Validation of Data with Bridge Classes in PHP 5
January 10, 2007 @ 14:03:00

DevShed has posted part two of their look at working with bridge classes in PHP5, looking in detail at the decoupling of the data validation from an input form.

In the course of this second tutorial, I'm going to show you how to create a bridge class which will come in handy for decoupling the validation of user-supplied data. There will be a class that defines generically how certain data must be verified, while others will implement different validation methods.

They start with building a simple bridge class, a validator class that defines methods to check strings, numbers, alphabetic, and email values. For each of these types, they create the corresponding bridge class that validates the input. Finally, they tie it all together, validating an example of each, handled inside of try/catch blocks to watch for the errors that might be thrown.

0 comments voice your opinion now!
php5 bridge class decouple tutorial validation form php5 bridge class decouple tutorial validation form



Similar Posts

Dallas PHP Users Group: PHP4 to PHP5 Minor gotcha

DevShed: Understanding Destructors in PHP 5

SecurityReason: Three Advisories for PHP 5.2.4 (dl, iconv_substr & setlocale)

David Sklar\'s Blog: Speed - DOM traversal vs. XPath in PHP 5

Stoyan Stefanov's Blog: phpBB front-end optimization - 1 hour workshop


Community Events









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


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

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