Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPBuilder.com:
Use Zend Framework Action Helpers to Reduce PHP Code Redundancy
Sep 15, 2010 @ 16:49:52

On PHPBuilder.com today there's a new tutorial from Jason Gilmore about using the action helpers in the Zend Framework to help reduce the amount of redundant code spread all over your application.

Embracing a framework-driven approach to Web development enhances productivity in many ways, not the least of which is the ability to stay DRY (Don't Repeat Yourself). Eliminating the redundant reuse of code throughout a Web application will greatly improve your ability to effectively test and later refactor code, not to mention locate and diagnose the inevitable bugs that will creep into the project. [...] The Zend Framework refers to these reusable logical snippets as action helpers, and in this article I'll show you how to create, configure and execute action helpers within your Zend Framework-powered applications.

He walks you through the steps of creating an action helper to create a simple one-time URL for an example application's email confirmation links. The class (WJG_Controller_Action_Helper_GenerateID) extends the abstract action controller and generates the code to append to the URL. When the code is needed, the helper can just be called directly and the string is returned for use in multiple types of emails.

tagged: code redundancy zendframework action helper tutorial

Link:

Travis Swicegood's Blog:
Quick review of Zend_Log
Sep 17, 2007 @ 14:32:00

Travis Swicegood, after having been asked to do a review of the Zend_Log component of the Zend Framework, wrote up his report and has also posted it to his blog.

The short answer to is Zend_Log good (enough): yes; the long answer, no. First off, it does what it needs to do without too much fuss [...] but... It has a few fatal flaws in my opinion.

While he found the simplicity of the component nice, the flaws seemed to outweigh the good. Problems like code redundancy and a simple thing like writing out to the log file isn't handled well (can't be accessed directly, only through the interface - slower in the long run?). He's included some tests to check out the difference.

tagged: review zendframework zendlog component test speed redundancy review zendframework zendlog component test speed redundancy

Link:

Travis Swicegood's Blog:
Quick review of Zend_Log
Sep 17, 2007 @ 14:32:00

Travis Swicegood, after having been asked to do a review of the Zend_Log component of the Zend Framework, wrote up his report and has also posted it to his blog.

The short answer to is Zend_Log good (enough): yes; the long answer, no. First off, it does what it needs to do without too much fuss [...] but... It has a few fatal flaws in my opinion.

While he found the simplicity of the component nice, the flaws seemed to outweigh the good. Problems like code redundancy and a simple thing like writing out to the log file isn't handled well (can't be accessed directly, only through the interface - slower in the long run?). He's included some tests to check out the difference.

tagged: review zendframework zendlog component test speed redundancy review zendframework zendlog component test speed redundancy

Link:


Trending Topics: