News Feed
Sections

News Archive


Community Events






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


feed this:

PHP in Action Blog:
Testing a Zend Framework action controller with View Helpers
0 comments :: posted Wednesday June 11, 2008 @ 07:56:11
voice your opinion now!

On the PHP in Action blog, there's a new post about a method for testing a controller as a part of a Zend Framework application with its own view helpers.

I came across a Zend Framework (ZF) example I wanted to refactor. You really have to have unit test coverage to refactor effectively, and since there were no tests, I started trying to find out how to test it. There didn't seem to be a wealth of information available on the web, so I've tried to figure it out by myself.

He walks through the testing process he followed - making some new default objects (for SimpleTest) and, using the flash messenger view helper, makes some mock classes to simulate sending the flash messages in an application.

tagged with: zendframwork simpletest unittest controller view helper


Padraic Brady's Blog:
Zend Framework App Tutorial - Part 9 Zend_Vew and Displaying Blog Entries
0 comments :: posted Tuesday May 27, 2008 @ 07:05:22
voice your opinion now!

Padraic Brady has posted part seven of his series on building a blogging application with the Zend Framework as a base. This time he's working on the output of the entries - using Zend_View to standardize the look and feel.

In previous parts we've been using View Helpers without even noticing it. Zend_Form doesn't generate forms by itself, rather it delegates most of the HTML generation to a set of View Helpers like Zend_View_Helper_Form. The problem with such output, is that View Helpers can only generate XHTML 1.0 Strict output if we actually inform them of the standard to use. [...] What we should do, is make the Doctype of our View more dynamic. This is achievable by using the Doctype View Helper.

Padraic talks about the different parts of the View layer in the framework (helpers, partials, placeholders) that were mentioned in previous parts. He shows how to change up his current setup to work with the Doctype View Helper to change the view and make it UTF-8 compliant.

He shows the changes to the bootstrap file, how he's grabbing the entries from the database and how he pushes that out to the view to be displayed. He also creates a custom view helper to create the entry URLs for each of the posts (Wordpress users out there, these are the stubs).

tagged with: zendview zendframework helper placeholder custom entry url doctype

The Bakery:
New Tutorials, News and Helpers Posted
0 comments :: posted Wednesday May 14, 2008 @ 14:31:52
voice your opinion now!

Several new tutorials, components, news and helpers have been posted to The Bakery, the CakePHP community site lately. Here's a sampling:

Check out The Bakery for more great CakePHP-related goodness.

tagged with: thebakery cakephp framework community tutorial news helper component

Zend Developer Zone:
View Helpers in Zend Framework
0 comments :: posted Tuesday April 29, 2008 @ 14:38:27
voice your opinion now!

The Zend Developer Zone has posted a new tutorial (from Matthew Weier O'Phinney) about a handy feature of the Zend Framework's view layer - view helpers that can be added in and reused across an application to do some pretty cool stuff.

A View Helper is simply a class that follows particular naming conventions, When attached to a view object, you can call the helper as if it were a method of the view object itself. The View object retains helper instances, which means that they retain states between calls.

View helpers can be use to do things like manipulate view data for more complex operations and carrying over data between two views, limiting the number of fetches that have to be done. He shows how to create a simple helper - My_Helper_FooBar - that just appends "fooBar " to whatever's passed in. He also talks about some of the default view helpers (like form fields), partials, the doctype() helper, capturing/caching content to be used later and the use of placeholders.

tagged with: zendframework view helper form partial doctype capture placeholder

The Bakery:
New Updates - Helpers, Tutorial and Articles
0 comments :: posted Tuesday April 15, 2008 @ 08:44:04
voice your opinion now!

The Bakery has posted tons of great content lately - here's just a sample:

Check out the rest of the site for more great CakePHP tips, tricks and helpers.

tagged with: helper tutorial article thebakery cakephpframework

Zend Developer Zone:
Action Helpers in Zend Framework
1 comment :: posted Wednesday April 09, 2008 @ 08:53:34
voice your opinion now!

On the Zend Developer Zone, there's a article posted from Matthew Weir O'Phinney spotlighting one of the handy features of the Zend Framework - Action Helpers.

Action Helpers in Zend Framework are often considered a fairly arcane subject, something for experts only. However, they are meant to be an easy way to extend the capabilities of Action Controllers, negating the need to create your own base controller with custom functionality. The aim of this tutorial is to show you how to quickly and easily create and use Action Helpers to your advantage.

He covers some of the basics - setting up a controller to extend Zend_Controller_Action - and assigning helpers to it. He looks hat hooking in events, registering and retrieving the helpers with a Broker and how to create your own custom helper. Their example is a form loader that lest you load the code for a form by submitting its class name.

tagged with: zendframework action helper controller example tutorial

The Bakery:
10 New CakePHP Articles, Tutorials and Helpers
0 comments :: posted Thursday February 21, 2008 @ 08:42:00
voice your opinion now!

The Bakery (the CakePHP repository) has posted lost of great new content to their site recently. Here's just a taste:

Also be sure to check out the rest of The Bakery for more great CakePHP-related articles, tutorials and helpful hints.

tagged with: thebakery cakephp framework tutorial tip article helper

KillerPHP.com:
Zend Framework Using View Helpers to Build Rich, Scalable, Controls
0 comments :: posted Thursday January 31, 2008 @ 12:03:00
voice your opinion now!

This new post from Jon Lebensold (on the KillerPHP blog) introduces you to a handy feature of the Zend Framework - View Helpers.

In summary, View Helpers are great for encapsulating forms, grids and other functionality that could eventually be bound to a different data source or even be pushed back to the user through a simple AJAX call.

Example code on how to use them is included showing a sample helper that adds Ajax functionality to a form's submit and pushes the response values back out into a div on the page.

tagged with: zendframework view helper ajax example code

The Bakery:
New Articles/Components/Helpers Posted
0 comments :: posted Wednesday January 30, 2008 @ 12:04:00
voice your opinion now!

The Bakery (for the CakePHP framework) has several new articles/helpers/components they've posted about lately - here's the list:

Check out The Bakery for more information on these and other great CakePHP-related items.

tagged with: thebakery cakephp framework component helper article



job book mysql zend security package PHP5 developer zendframework database ajax example PEAR release code framework releases cakephp application conference

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