(on Thursday, 27 November 2008, 05:13 AM -0800):
> Matthew, have you decided where forms should go in this proposed structure?
>
> Once there was a thread it:
> http://framework.zend.com/wiki/display/ZFPROP/Zend+Framework+Default+Project+Structure+-+Wil+Sinclair
>
> I wonder if anything changed and there is recommendation where to put the
> forms. I used to do that like: My/Form/FormName.php so far.
>
> Thanks for any clarification on that.
The recommendation is:
application/
forms/
However, an argument may also be made for putting in subdirectories
beneath application/models/ -- if your model uses a form as a validation
chain. As an example, in my pastebin I have this:
application/
models/
Paste.php (Paste)
DbTable/
Paste.php (DbTable_Paste)
Paste/
Form.php (Paste_Form)
// or
Form/
Paste.php (Form_Paste)
The "Paste" model then uses the form for validating incoming data.
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论