News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

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


Padraic Brady's Blog:
An Example Zend Framework Blog App - Part 3 A Simple Hello World Tutorial
0 comments :: posted Tuesday April 29, 2008 @ 12:57:56
voice your opinion now!

Padraic Brady has posted part three in his look at making a blogging application with the Zend Framework. This time get gets down and gets into the code.

It's almost obligatory when introducing a new programming topic, that the author present the simplest possible example. Usually this means getting a programming language or framework to print "Hello World" to the screen. I'm going to be no different. So much for originality...

He shows how to set up everything, down to the Apache VirtualHost directive and hosts file to get the web server and localhost working correctly. He includes the code for the boostrap file and how to create your first controller (along with its view, of course).

tagged with: zendframework helloworld tutorial blog controller view bootstrap

Michael Girouard's Blog:
Rolling Your Own MVC The View
0 comments :: posted Monday April 28, 2008 @ 09:39:45
voice your opinion now!

Michael is back with part three of his series stepping you through the creation of your own MVC framework (Part 1 and Part 2) with a look at the part that interfaces with the user - the View.

Using the view as a starting point may seem odd at first considering the view-related actions are some of the last steps in the page load scenario, but since our views don't have any external dependencies, unit tests are very easy to write and so is the accompanying code.

He explains how views work along with the rest of the framework and some of the basic rules surrounding how they get their data. Code comes along with the explanations for different views like XML, HTML and JSON methods of output.

tagged with: modelviewcontroller mvc view tutorial output xml html json

Hasin Hayder's Blog:
Getting started with orchid framework
0 comments :: posted Tuesday April 08, 2008 @ 13:01:47
voice your opinion now!

Hasin Hayder has blogged about some of his "first steps" with a relatively new PHP framework on the scene - Orchid.

Orchid is a small framework with bare necessities to kick start developing killer php web applications. this framework is not flooded with unnecessary features and libraries. it only contains the essential helpers and libraries to boost up your development, not slowing it down. orchid features a very short learning curve, which will keep you trouble free.

He documents the step he followed - downloading the latest release (from the svn repository), making a first controller and adding a view to make his first "hello world" application.

tagged with: orchidframework beginner tutorial controller view example

Chris Hartjes' Blog:
"My framework is more MVC than *your* framework!"
0 comments :: posted Friday March 07, 2008 @ 08:45:00
voice your opinion now!

Chris Hartjes has posted about a topic, while not new in the PHP community it seems to have resurfaced more lately - how MVC is implemented (or not implemented) in most of the PHP-based Rails-esque frameworks.

This guy [making comments at PHP London] apparently works for the Agavi project. [...] The comments for that [reddit] post are really interesting too, as people take their usual swipes at PHP, and CakePHP, and the Symfony guys come out in droves to talk up Symfony, and on and on it goes. Sadly, this is not a unique occurance on the web.

Chris took a closer look at Agavi to see what made its MVC so special - only to find that it just does it different, but not necessarily "right" (he includes a code example to illustrate). He also quotes Wikipedia's definition of an MVC framework and notes that CakePHP seems to fit it to a tee.

tagged with: mvc model view controller framework agavi cakephp

Rob Allen's Blog:
A View Stream with Zend_View
0 comments :: posted Thursday February 07, 2008 @ 07:58:17
voice your opinion now!

Rob Allen has posted about a small modification that he made to his Zend Framework setup that allows for a little safer echoing of information out to the View later of an application.

One of my biggest issues with using PHP as the templating engine in View scripts is that the easiest way to echo a variable is the least secure. [...] So, I decided to leverage a post by Mike Naberezny from a while ago about streams. The idea is all his; I just modified it to work with Zend Framework's Zend_View the way I wanted it to.

His method uses a slightly different output format - instead of using a normal echo statement to push out the escaped output, it uses a special syntax using the "@" sign as a shortcut to the call to escape(). He includes the code you'll need to make it work in your ZF install and explain it a bit (including where the real key lies - in stream_popen).

tagged with: zendframework stream zendview escape custom output view

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

Rob Allen's Blog:
Zend_View Access the view from a view helper
0 comments :: posted Friday December 07, 2007 @ 12:08:00
voice your opinion now!

In this new blog entry, Rob Allen has shared a simple View setup that he's been using in his Zend_View setup (on the Zend Framework).

It's in the manual, but I thought I'd blog about my simple View Helper setup that ensures that I can get at the view with minimal effort. [...] his class contains the code required by Zend_View to collect an instance of the view and assign it to a protected variable. All my view helpers extend this class and so I can access the view using $this->_view.

His code creates a simple object that all of his views extend and make a single object that refers back to the view itself.

tagged with: zendview zendframework helper access view zendview zendframework helper access view


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

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