News Feed
Jobs Feed
Sections




News Archive
Jani Hartikainen's Blog:
Another idea for using models with forms
January 07, 2009 @ 12:31:54

Jani Hartikainen has posted his idea for using forms along with models in a Zend Framework application.

Matthew Weier O'Phinney wrote about using Zend_Form with models. His approach puts a form inside a model, which then uses the form to validate itself. While this idea is not bad, I find it being upside down - I think the form should use the model to validate itself, not the other way around.

Jani describes two alternate methods - using a global model to do the checking or a model-based validation class that would inherit the model's functionality through being extended. He describes each option's setup and potential use (no code is included save for a few small examples).

0 comments voice your opinion now!
model form validation global zendframework application


blog comments powered by Disqus

Similar Posts

NETTUTS.com: Book Review: Zend Framework 1.8 Web Application Development

Zend Developer Zone: AJAX Chat Tutorial Part 7 : Usability Improvements

Alexey Zakhlestin's Blog: PHP+SCGI part 2: problem with eZComponents

Jani Hartikainen's Blog: How to CSRF protect all your forms

Site News: Making the Move to the Solar Framework


Community Events











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


opinion series composer testing functional conference code podcast development interview object language community release example framework introduction tool database zendframework2

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