Zendcasts Forum

A community of developers who work with the Zend Framework and other enterprise PHP technologies

You are not logged in.

#1 2010-02-28 17:54:26

Jon Lebensold
Administrator
Registered: 2009-06-27
Posts: 279

ZC48 – Creating Custom Zend_Form Decorators

This little video tutorial should set you up for building your own custom Zend_Form decorators in 15 minutes. I'll show you how you can make the necessary class and have it easily added to your existing Zend_Form_Decorator configuration.

Grab a copy of the project or browse the repository.

Offline

#2 2010-03-03 05:03:30

iznogood
Member
From: Montreal
Registered: 2009-12-17
Posts: 20
Website

Re: ZC48 – Creating Custom Zend_Form Decorators

What a great tutorial again. You know its quite the skill to be able to put yourself in our shoes and go thru how you discovered how things worked again for our benefit. Thats what I learn the most in your vids. I can interpret any piece of code and implement anything but I could use pointers on how to find out how ZF works. I admit I am instinctively afraid of looking thru all that code. But you make me realize how simple it all is in fact.

Anyways. One thing I noted in this video is how much work is involved in making those decorators as opposed to just writing a view-script for your form. Especially when you say it leverages the framework for business needs. Well if its one form in one project that I will never reuse I have a hard time justifying writing a set of decorators for it. The part of me that always wants to write good form code the standard way wants to write decorator but I work in a business and these things are never considered by the higherlevels.
I said how much more work I realise its not THAT much more and maybe I am missing something and it actually makes you deliver the product faster.

Oh well thanks again for the great video.

Offline

#3 2010-03-04 09:53:01

marsbomber
New member
Registered: 2009-08-06
Posts: 6

Re: ZC48 – Creating Custom Zend_Form Decorators

Agree with @iznogood. I used to use decorators and just do echo form in my view script. But when the form gets complex, I just lost myself in the decorators ... I now primarily use Zend_Form for my model validation. Form redering is left to my view helpers. I found this is not really a lot of duplication and it's definitely more designer-friendly.

Offline

Board footer

Powered by FluxBB