About the Author

Chris Shiflett

Hi, I’m Chris: entrepreneur, community leader, husband, and father. I live and work in Boulder, CO.

Zend Framework Preview

A preview of the Zend Framework is now available:

Please download it, read the manual, and give it a go. If you find any problems, please report them, so they can be fixed.

Congrats to everyone who worked on this, especially Mike. Our journey has just begun.

Note: I'll have more to say soon.

About this post

Zend Framework Preview was posted on Sat, 04 Mar 2006. If you liked it, follow me on Twitter or share:


1.Rob Allen said:

Nice to see some code :)

The manual is helpful. Note thought that the Zend_Controller is not documented yet. I've had a play and it seems easy enough though. My notes are up on http://www.akrabat.com/2006/03/04/zend-framework-front-controller/ but of course, I might have misunderstood it :)

Sat, 04 Mar 2006 at 14:09:28 GMT Link

2.Chris Shiflett said:

Thanks, Rob, that's very helpful!

Sat, 04 Mar 2006 at 14:15:16 GMT Link

3.Richard Thomas said:

Will most likely never use it as a framework but the pdf and searching bits look extremely interesting.

It would be nice to see those end up in pear.

Sat, 04 Mar 2006 at 15:50:43 GMT Link

4.Chris Shiflett said:

Hi Richard,

I know Zend plans to provide their own PEAR channel for distribution, so that will be an option.

One of the goals of ZF is to not force you to use anything you don't want, even if you don't want a framework at all. So, in theory, it works very well together as a framework, but you can also use individual components to solve specific needs.

If you have any trouble using it in this way, please let us know.

Thanks for the feedback!

Sat, 04 Mar 2006 at 16:18:54 GMT Link

5.Rob Allen said:

The acid test will be to see if you can live without Zend.php :)

I might test this evening.

Sat, 04 Mar 2006 at 17:17:15 GMT Link

6.Chris Shiflett said:

My understanding of Zend.php is just that it's a place for static methods that might be useful to many different components. I know many components don't need it, and I wouldn't hold it against those that do. :-)

In other words, I don't think requiring Zend.php necessarily makes a component bloated.

Sat, 04 Mar 2006 at 19:12:08 GMT Link

7.GWild said:

I downloaded ZF and took a quick peek at some code.

I noticed a class that extends Exception. Am I correct that, since only php5+ has exceptions, this is not something I can use with some old php4.3 code I have? Sounds interesting in any case.

Off topic: I got stuck in the DC airport last week, and used the time to read Essential PHP Security. Great book Chris - very useful material.

Sat, 04 Mar 2006 at 20:03:03 GMT Link

8.Rob Allen said:

Chris, I agree that depending on Zend.php isn't necessarily a problem, especially as it contains the registry. However it does introduce more coupling as you are then forced to keep the basic directory structure so that loadClass() works.

Sat, 04 Mar 2006 at 20:31:26 GMT Link

9.Chris Shiflett said:

Thanks very much, GWild. I really appreciate that. :-)

Yes, ZF requires PHP 5. That decision was made early, and I'm glad, because it allows us to take advantage of the new features in PHP to offer a more useful tool.

I don't really see a problem with keeping the basic directory structure, because ZF is only going to be provided as a single, complete distribution. You can still pick and choose the components you want to use, but you don't obtain them individually.

Sat, 04 Mar 2006 at 20:39:11 GMT Link

10.Chris Shiflett said:

ZF has been Dugg, although the version number is advertised incorrectly:


Sat, 04 Mar 2006 at 20:50:02 GMT Link

11.Aaron Wormus said:

But why the final "advertising" clause of an otherwise new BSD license? The reason for the existance o the new BSD license was because the advertising clause in the original BSD license was fundimentally incompatible with the open source model.

Sat, 04 Mar 2006 at 22:11:22 GMT Link

12.Pento said:

This is from man


To create an instance of Zend_Db_Adapter for your particular database backend, you need to call Zend_Db::factory() with an array of parameters describing the connection. For example, to connect to a MySQL database called "camelot" on the local host as a user named "malory":


require_once 'Zend/Db.php';

$params = array (

'adapter' => 'pdoMysql',

'host' => '',

'username' => 'malory',

'password' => '******',

'dbname' => 'camelot'


$db = Zend_Db::factory($params);



But if we look into sources, we can find this


static public function factory($adapterName, $config = array())


if (!is_string($adapterName) or !strlen($adapterName)) {

throw new Zend_Db_Exception('Adapter name must be specified in a string');



So, as i think, need to improve manual...

Sun, 05 Mar 2006 at 12:56:13 GMT Link

13.Chris Shiflett said:

Yes, I noticed this yesterday and changed the documentation. It should read:


require_once 'Zend/Db.php';

$params = array ('host' => '',

'username' => 'malory',

'password' => '******',

'dbname' => 'camelot');

$db = Zend_Db::factory('pdoMysql', $params);


Sun, 05 Mar 2006 at 15:07:33 GMT Link

14.Werner said:

This is an exciting time for PHP developers. I have a big project in the making, and I'm going to "risk" building a big part of it on the ZF, in order for me to learn more about it (getting your hands dirty is still the best way to learn, I believe), but also to start using something that I believe I will use for quite some time to come.

Thank you so much to everyone that contributed, I hope the community embraces ZF, making it the de-facto standard for PHP dev taks in the (not-so-distant) future.

This is really great, seeing the progress and seeing it all come together to this point. Wow.

Sun, 05 Mar 2006 at 21:40:19 GMT Link

15.Chris Shiflett said:

Thanks for your kind support, Werner. :-)

Sun, 05 Mar 2006 at 23:50:16 GMT Link

16.Florian said:

Hi experts, I read most of the ZF Manual. There is a suggested directory structure. I just wondered what should go into "models". I understand the model is a layer between the controller and the view... What is an elegant way to do this with ZF?

--- Florian

Wed, 22 Mar 2006 at 21:35:15 GMT Link

Hello! What’s your name?

Want to comment? Please connect with Twitter to join the discussion.