News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

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

PHPMaster.com: Localizing PHP Applications "The Right Way", Part 2

Roshan Bhattarai's Blog: Which is the best PHP framework ?

Errumm.co.uk: My first experience in building a FaceBook Application in PHP

The Bakery: Five New Posts - Custom Views, CSS, ViewInFile, ActsAs and Email Validation

Andre Liem's Blog: 5 tips and tools to optimize your php application - Part 1 simple


Community Events

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


opinion series release framework unittest laravel video api example version interview language community podcast introduction security laravel5 php7 voicesoftheelephpant library

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