2009年6月8日星期一

Re: [fw-mvc] Best practice for default module directory



On Mon, Jun 8, 2009 at 9:08 AM, Matthew Weier O'Phinney <matthew@zend.com> wrote:
Actually, Zend_Tool now has module support (as of 1.8.2). When you
create a module, it places it in application/modules/<modulename>, and
creates the appropriate directory structure.

The default module is assumed to be directly under application/, and
this is how Zend_Tool was written. The idea is that your default module
is typically non-reusable, and very site-specific, and as such falls
outside of your other modules (which should typically be re-usable).


Woa -- run this by me again? I thought that if your app had modules, *all* your modules -- default included -- had to reside under a common directory, e.g., application/modules. I further thought that the way your directory structure ends up after you create a module with the tool was just a flaw in the tool. You're saying the default module's controllers etc can simply be in application/ while the foo module's files can be in application/modules/foo? Interesting!

 

--
Matthew Weier O'Phinney
Project Lead            | matthew@zend.com
Zend Framework          | http://framework.zend.com/



--
David Mintz
http://davidmintz.org/

The subtle source is clear and bright
The tributary streams flow through the darkness

没有评论: