I found this question on stack overflow and I have a question about one of the answers:
In Zend Framework, forms are typically objects with decorators, but usually (I thought) processing is done using a combination of controllers and models, with the main objective to keep the controller as lightweight as possible, and each object responsible for its own state.
One of the answers said to use the form object itself as the place to encapsulate the form processing members. Is that a good practice?
For some reason that seems awkward to me. But it also seems awkward to do most of the work in either the database abstraction layer (Zend_Db_Table/Row) or the controller. Where is the best place to encapsulate form processing? Should you create separate classes for the form itself and another class for processing the form (which then deals with the DBAL)?
Edit: here is another SO post that asks a similar question, but the OP doesn't get a complete answer.
We want to know: where does each part of the form processing logic belong?