Category Archives: Application Design

Modifying Zend_Db_Adapter_Abstract::quoteInto to accept multiple question marks

A nice feature from Zend Framework (ZF) is its robust database adapter. Although there is still some work needed to extend the functionality (ORM?) and some strange bugs I encounter when working with multiple tables, Zend_Db package is already good solution for my CRUD application.

In Zend_Db_Adapter_Abstract, there is a function called quoteInto which is used to quote a field value from an sql statement. Most implementation is in where clause like

$where = $db->quoteInto('name = ?','John Doe');

Continue reading

Zend Framework: A Gem in Less Than A Penny

I’ve been searching for robust PHP framework which does more than a set of classes. After playing with some frameworks available on the internet, I stumble upon Zend Framework, a framework provided by Zend.

Quoting Zend, this is their definition for Zend Framework

Zend Framework is a simple, straightforward, open-source software framework for PHP 5 designed to eliminate the tedious details of coding and let you focus on the big picture. Its strength is in its highly-modular MVC design, making your code more reusable and easier to maintain. Although it’s currently in preview release, take a look—you may be surprised.

I accentuate on the last phrase, and yes, i was surprised. ZF has clear logic and workflow for what a framework must posses. It has Zend_Loader for loading necessary class and Zend_Registry for keeping object singleton. Zend_View handles the viewer nicely from the MVC and uses PHP directly to parse variables and routines within templates (this is great since some template engines parse variables within templates thus increasing process time and give some overhead). Other features are also nice. You can find them by reading the documentation and manual.

Supported with good documentation, mailing list, and active community, ZF seems promising for being the most popular PHP framework in the future. Give ZF a try. It costs less than a penny.