-- DorkFest <[email protected]> wrote
(on Saturday, 13 February 2010, 04:19 PM -0800):
> A year or two ago you posted your latest practices on architecting models
> with built in validation by embedding a Zend_Form. I'm wondering if you're
> still using that technique or have refined it at all or basically what your
> latest thinking for ZF model architecture is. Also, if you have or would
> like to share any code examples.
>
> And I welcome anyone else of course to chime in with relevant links or
> comments about model validation.
I will direct you to my ZendCon presentation on architecting models:
http://www.slideshare.net/weierophinney/architecting-your-models
In that presentation, I argue for creating a rich domain model that
includes entities, aggregates, mappers (or an ORM), and a service layer.
I personally do validation in my service layer, and will often use a
form object to do this validation; future iterations of Zend_Form will
allow injecting the filter and validation chains, which will make it
possible to use simply these artifacts in your service layer, and then
attach them to your form in your view layer.
--
Matthew Weier O'Phinney
Project Lead | [email protected]
Zend Framework | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc