News Feed
Sections




News Archive
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
September 15, 2010 @ 11: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.

0 comments voice your opinion now!
code redundancy zendframework action helper tutorial


blog comments powered by Disqus

Similar Posts

DevShed: Building an Image Generator Class with PHP 5

DevShed: Creating AJAX Requester Objects with Abstract Factory Classes in PHP 5

Ian Christian's Blog: Handling Uploaded file in symfony’s admin generator

Oracle Technology Network: Integrate PHP & Java Applications w/Oracle WebLogic Server & Zend Server

Matthew Weir O'Phinney's Blog: NYPHP Zend Framework Presentation


Community Events

Don't see your event here?
Let us know!


interview laravel release php7 introduction community application podcast library framework example version testing opinion performance voicesoftheelephpant series api extension symfony2

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework