# Vaporware No More: Zend Framework Available


By Ben Ramsey

Published on March 5, 2006


A preview release (v0.1.1) of the [Zend Framework](http://framework.zend.com/) is now available, and, so far, I must say that all looks well.

The one thing that I'm a bit curious about is the apparent removal of the [Active Record](http://en.wikipedia.org/wiki/Active_record_pattern) implementation, Zend\_Db\_DataObject. The documentation for this object exists in the [Programmer's Reference Guide](http://web.archive.org/web/20060404214454/http://framework.zend.com/manual) ([see also `Zend_Db_DataObject.xml` in Subversion tag `release-0.1.1`](http://web.archive.org/web/20150427130247/http://framework.zend.com/svn/framework/standard/tags/release-0.1.1/doc/module_specs/Zend_Db_DataObject.xml)), but it's nowhere to be found in the API. I wonder whether the implementation exists in a different form in Zend_Db, or was it scrapped altogether?

The Active Record implementation aside, one of the other features I was looking forward to was the Zend_InputFilter framework. I know that [Chris](http://shiflett.org) will undoubtedly write much more about this, but I wanted to point out one very cool feature: the strict mode.

The strict mode works like this: you pass an array of tainted data (let's say the `$_POST` array) to Zend\_InputFilter to create a new object to access the data in a safe manner, and, then, by default, `$_POST` is set to `NULL` for the remainder of the script---you simply cannot access the raw, tainted data from `$_POST`. Here's an example:

```php
$filterPost = new Zend_InputFilter($_POST);
$username   = $filterPost->isAlpha('username');

var_dump($username); // will either contain the value of
                     // $_POST['username'] (if it contains only
                     // alphabetic characters) or FALSE
var_dump($_POST);    // will print NULL
```

This strict mode could be very useful in an environment with a team of application developers. Just set `auto_prepend_file` in `php.ini` to load up a script that grabs all autoglobal variables (`$_POST`, `$_GET`, `$_COOKIE`, etc.) and stores them to Zend_InputFilter objects, and you never have to worry about your team accessing raw data---they must always use the Zend_InputFilter object to get to the data. (There is a `getRaw()` method of this object, but I'll let Chris discuss it in more detail.)

Finally, lots of folks are already talking about this. Here are some links:

* [Davey Shafik](http://daveyshafik.com/archives/124-zend-framework-and-flickr.html)
* [John Lim](http://phplens.com/phpeverywhere/?q=node/view/228)
* [Stuart Herbert](http://web.archive.org/web/20060319194754/http://blog.stuartherbert.com/gentoo.php/2006/03/05/zend_framework_and_the_contributor_licen)
* [Ivo Jansch](http://web.archive.org/web/20060310011936/http://www.achievo.org/blog/archives/29-Quick-Zend-Framework-review.html)
* [Harry Fuecks](http://www.sitepoint.com/zend-framework-is-out/)
* [Andi Gutmans](http://andigutmans.blogspot.com/2006/03/quick-zend-framework-update.html) (update)
* [Andi Gutmans](http://andigutmans.blogspot.com/2006/03/php-collaboration-project-reaches.html)
* [Chris Shiflett](http://shiflett.org/blog/2006/mar/zend-framework-preview)
* [Richard Heyes](http://web.archive.org/web/20060614195643/http://www.phpguru.org/article.php?ne_id=96)
* [Sebastian Bergmann](http://web.archive.org/web/20060422162648/http://www.sebastian-bergmann.de/blog/archives/581-Zend-Framework-in-Gentoo-Linux.html)
* [PHPDeveloper.org](http://www.phpdeveloper.org/news/4929)


