-- maxarbos <[EMAIL PROTECTED]> wrote
(on Wednesday, 13 August 2008, 02:14 PM -0700):
> OK, so it seems like i am on the right track, thanks.
> 
> BUT after reading this article:
> http://phpimpact.wordpress.com/2008/07/28/zend-framework-architecture/
> 
> The section under: Criticism > Design : 'Also, Zend_Controller doesn’t allow
> modular systems to load model files from within its own module as well as
> outside modules.'  .
> I read through the link in that paagraph and there are some interesting
> suggestions, so I wanted to know if there was any update on the suggested
> best way of doing such.

Part of the reason is because we simply haven't addressed the story of
Models in ZF yet. We hope to do so in coming releases, but it's been
something we have not come to consensus on -- do we need a base model
interface? if so, what would it look like, what would it need to do? We
_are_ certain that Model != DB, and we want to encourage keeping that
separation.

There _are_ some proposals in place that would address much of what
Federico discusses in that blog -- a ModelLoader action helper would
resolve models across modules (including prefixes and paths), and would
leverage Zend_Loader_PluginLoader. Another proposal addresses some ideas
about Model interfaces.

I think we're getting close to having the functionality described; we
just have to get there.

> So it seems Thin Controller / Fat Model may be the best solution for this.
> 
> Does Matthew agree ? :)

This is definitely what I advocate. Put as much decisioning logic in
your model as possible, and keep action methods clear and concise. This
makes testing easier, and clearly separates concerns.


> tfk wrote:
> > 
> > On Wed, Aug 13, 2008 at 3:32 PM, maxarbos <[EMAIL PROTECTED]> wrote:
> >>
> >> any Best Practices suggestions?
> >>
> >>
> >>
> >> maxarbos wrote:
> >>>
> >>> hello,
> >>>
> >>> I am trying to figure out the best practice for a situation where there
> >>> will be different modules, controlled by ACL where certain portions of
> >>> it
> >>> will be very similar from module to module.
> >>>
> >>> ex:
> >>>
> >>> site.com/admin
> >>> site.com/user
> >>>
> >>> both of these modules will have functionality to edit the users name and
> >>> address.
> >>>
> >>> site.com/admin/person/contact/edit
> >>> site.com/user/person/contact/edit
> >>>
> >>> Should I move all the processing code to the Person model and thin out
> >>> the
> >>> controllers?
> > 
> > I follow the "fat model, skinny controller" concept. So I guess that
> > means "yes", however, I try to be careful about creating dependencies
> > from module a to module b. I'd rather use the libraries and write
> > model wrappers for them.
> > 
> > Till
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/Modules-and-Shared-functionality-tp18952739p18971391.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
> 

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to