 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Adrian Schneider's Blog: Caching Zend Framework Forms
by Chris Cornutt February 11, 2010 @ 11:36:10
In a new post to his blog Adrian Schneider looks at a method for caching your forms in your Zend Framework application so you don't have to recreate it every time.
Generating a form is an expensive process in ZF. It's always bugged me that I can't find any resources on trying to cache the initial HTML anywhere, so I took a stab at it myself. I use a loader from inside my controller action to load forms and models, so I found that was a good place to start.
To help solve the problem, he's created a simple loader class (maybe dropped into an action helper) that, when used will cache the form (using Zend_Cache, of course) to keep the object instance where you can get to it later. The code to implement it and to put it to good use is also included.
voice your opinion now!
cahe zendform zendframework zendcache tutorial
Adrian Schneider's Blog: Forms in Zend Framework
by Chris Cornutt February 10, 2010 @ 08:19:39
Adrian Schneider has posted a new article to his blog today looking at some of the benefits that come with using Zend_Form in your Zend Framework application.
I'm often asked what my favorite component of Zend Framework is, and I invariably answer: "Forms". Forms have always played an awkward role in the model-view-controller paradigm. Sure, the form is just HTML, but to me, it represents something more abstract than that.
He touches on a few topics like form creation (with many ways to accomplish it), filters, validators, how they can help to make skinny controllers and a few more. A few code examples are sprinkled in where there's a need for clarification.
voice your opinion now!
zendframework zendform feature
Chris Hartjes' Blog: Creating Usable Forms With Zend Framework
by Chris Cornutt January 28, 2010 @ 10:48:16
Chris Hartjes has a new post to his blog today looking at how to make forms in a Zend Framework application in a bit more reusable fashion.
After searching around online for some examples of building simple forms, I was dismayed to discover there were two different ways of building the form. I could (a) do it the long way and create specific instances of the form elements using Zend_Form_Element_X or (b) do it the short way and add them to the form by use of Zend_Form::addElement() and pass it the type of form element I want via an array. For reasons I cannot explain initially, I decided to do things the long way. Later on, I found out that doing it this way saved me from rewriting.
He includes the code for his sample form that lives in a file outside the controller so he could use it for both the "add" and "edit" actions. He shows how to plug that into the controllers, the views to show the end result and a few decorators to get rid of the default form formatting and customize it how he needed.
voice your opinion now!
zendframework form zendform reusable tutorial
Tibo Beijen's Blog: Zend_Form Building dynamic forms
by Chris Cornutt December 21, 2009 @ 13:37:22
In this new post to his blog Tibo Beijen looks at more things you can do with dynamic forms in the Zend Framework. This time he breaks the "one row to one form" link for cases of undetermined fields or when no one-to-one connection exists.
Take for example a shopping cart that shows the amounts of each product. In this article I'll take a look at how to dynamically construct a form based on the data being edited, use subforms to reuse common parts and group related values, create composite
'elements' by using the default Zend_Form_Element in combination with a custom decorator, create additional elements with Javascript and have them processed by the form when submitted.
He lays out the situation where this might be used and how to use the Zend_Form component to create more abstract objects for working with your data. He adds on a decorators to the objects to replace the ViewRenderer decorator and integrates jQuery to allow the user to add in new fields as they need them.
voice your opinion now!
zendframework dynamic form tutorial zendform
Tibo Beijen's Blog: Using Zend_Form without Zend Framework MVC
by Chris Cornutt December 07, 2009 @ 11:17:04
Tibo Beijen has a recent post to his blog about using a popular component of the Zend Framework, Zend_Form, without having to use the entire framework to get it.
Most components of Zend Framework can be used without using the entire framework and Zend_Form is no exception. It's a versatile component that can be customized to great extent. The payoff is that seemingly easy tasks can seem quite complex to complete and involve concepts like Decorators and View Helpers. Complexity is increased by the fact that most tasks can be achieved in multiple ways.
He looks at creating a Zend_Form object and using it to: create a simple email field, make a multi-checkbox, add in custom validators to each field, add decorators to the object and render it in a page.
voice your opinion now!
zendframework zendform tutorial mvc
Giorgio Sironi's Blog: Advanced Zend_Form usage
by Chris Cornutt October 22, 2009 @ 11:20:09
On his blog today Giorgio Sironi has posted a look at some advanced usage of the Zend_Form component of the Zend Framework:
If you have ever duplicated a form for editing and adding a new entity to your application, or have felt the pain to manually populate text inputs, you now know being able to reuse a form is a killer feature and in fact many php frameworks provide a form library. Today I have gathered from my experience some know-how I have learnt while taking the Zend_Form component to its limits.
He talks about decorators, ignored elements, subforms, the Dojo javascript functionality and the captcha feature of the Zend_Form component.
voice your opinion now!
zendform advanced tutorial usage
Rich Buggy's Blog: Dynamic forms using Zend_Form
by Chris Cornutt June 24, 2009 @ 12:05:24
Rich Buggy has posted a new tutorial to his blog looking at the Zend_Form component of the Zend Framework and how you can have it cooperate with the generation of more dynamic forms.
While most forms contain fixed fields there are occasions when you need a form to be dynamic and adjust itself based on user input. The adjustment could be as simple as altering the options in a drop down list or as complex as adding/removing fields. In this post I'm going to cover how to create a dynamic form using Zend_Form and jQuery. I'll use the example of a registration form that prompts the user for their country and state.
He extends the Zend_Form component to make his own registration form with two fields - country and state. Combined with the jQuery code to pull in the JSON formatted state information, the form updates the States list as the country is selected. Complete code is provided.
voice your opinion now!
json jquery zendform zendframework
|
Community Events
Don't see your event here? Let us know!
|