June 20, 2006

PHP Framework - The Zend Framework

You will find other articles relevant to this document in these sections:
Cameron Manderson @ 10:17 am

I read over an article last month in my PhpArch magazine which demonstrated some of the capabilities of the new Zend Framework (currently Preview version 0.1.3). The article demonstrated creating a Invoice PDF based on a database call, adding it to a lucene search engine and then emailing it to a client. The article wasn’t too long but gave a quick overview of some of the nice features of the framework.

The framework comprises of several different modules which are plugged together, with an underlying set of utility methods for locating and including classes/files. The framework includes such packages as:

  • Controller - Part of the Zend MVC framework
  • DB - Database Abstraction with OO hanlding for database records
  • Feed - Creating RSS/Atom feeds and also reading in from them
  • Filters - Reading in from user input (Chris Shifflet provides some good details about the security when using filters)
  • JSON - Simple JavaScript Object Notation for lightweight data exchange from PHP to JavaScript (great for AJAX)
  • Log - A Logging class providing logging with level/severity
  • Mail - Sending mail with PHP, similar to the PHPMailer alternative, supports alternate SMTP servers, HTML emails, attachments
  • PDF - For generating PDF’s from PHP
  • Search - Lucene based search engine where you create indexes and can later search
  • View - Simple wrapper for a view/template - Part of the Zend MVC framework
  • XmlRPC - Classes for creating RPC

(They are also asking for develop helps with the modules). The framework is currently only support version PHP5+ and will not work (ever) on PHP4, which is a real annoyance to me at the moment (this whole issue of PHP5 vs 4 and hosting services making the switch). Overall it seems to be quite friendly to use. From what I read about the View/Controller I think I prefer using the Struts based frameworks as they have been hard tested and have survived many years of application development.

The goals of the Zend Framework are:

  • Provide a repository of high quality components that are actively supported (PHP5 in E_STRICT)
  • Provide a complete system for developing web applications powered by PHP5
  • Don’t change the PHP - it’s already a great platform
  • Embrace collaboration and community to further advanced PHP5 programming
  • Positively contribute to the PHP 5 ecosystem and the PHP collaboration project

These all will help do great things for PHP and hopefully start to help its up take for a decent web application development environment.

Have a read about the Zend Framework here.

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • Furl
  • Reddit
  • YahooMyWeb

4 Comments »

  1. Is this Zend framework based on the Open Source MVC at phpmvc.net ??? Or is it completely different?

    Comment by Richard Lee — June 20, 2006 @ 11:47 am

  2. Completely different. phpmvc.net is a port of Struts v1, which is a JEE MVC style for PHP. Zend is its own MVC framework, meaning you can’t apply your Java Struts knowledge to Zend, but you can to php.MVC.

    Comment by Cameron Manderson — June 20, 2006 @ 11:55 am

  3. Fair enough, thanks for the info!

    Comment by Richard Lee — June 20, 2006 @ 1:58 pm

  4. I found a good post for integrating Smarty into Zend Framework (ZF)

    Visit the link here: http://www.phpinsider.com/smarty-forum/viewtopic.php?p=30923&

    Comment by Cameron Manderson — July 17, 2006 @ 10:19 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment