Zend Framework Preview Release

By Deane Barker on March 4, 2006

Zend Framework: Zend has released their framework Web site and has a preview release out there. There’s documentation, including some good code samples.

Inserting a record:

class RoundTable extends Zend_Db_Table {}
$table = new RoundTable();
$data = array('noble_title' => 'King',  'first_name'  => 'Arthur', 'favorite_color' => 'blue')
$id = $table->insert($data);

Getting a record:

class RoundTable extends Zend_Db_Table {}
$table = new RoundTable();
$row = $table->find(1);

It doesn’t make any attempt to hide the database, like Rails does. Rails is very object-centric, while it looks like the Zend Framework still leaves you very aware of the underlying data model. I can think of things I like about both approaches.

But, in the end, what they’re doing above is all doable with PEAR_DB, isn’t it?

Gadgetopia

Comments

  1. I think you’re comparing one database component to the ActiveRecord implementation in Rails. ZendDbDataObject, not included in the preview release (but documented in the manual), is an ActiveRecord implementation and might be closer to what you want.

  2. ZendDbDataObject, not included in the preview release (but documented in the manual), is an ActiveRecord implementation and might be closer to what you want.

    Just goes to prove I should read things more closely. Thanks.

Comments are closed. If you have something you really want to say, email editors@gadgetopia.com and we‘ll get it added for you.