2008年11月21日星期五

Re: [fw-mvc] Project structure again

-- Michał Zieliński <zielun@gmail.com> wrote
(on Friday, 21 November 2008, 05:29 AM -0800):
> I see that proposal
> http://framework.zend.com/wiki/display/ZFPROP/Zend+Framework+Default+Project+Structure+-+Wil+Sinclair
> is in incubator. So I`d like to consider this approach for the next project.
>
> However, I got one question. What if I have to realize many projects on one
> server? Each project is independent but each is also based on the same
> libraries like Zend`s. So I`d like to create one library dir for all
> projects. I can`t see possibility to do so in this, proposed method.
>
> As it seems to be recommandation soon could you please give me advice how to
> implement this attempt?

The proposal indicates that the library/ directory should be used for
shared, cross-application code. Furthermore, if you follow the ZF coding
standards, you would put your shared code in it's own namespace --
analagous to a subdirectory -- within the library. As an example:

library/
My/ => class prefix is 'My_'
Foo/ => class prefix is 'Foo_'
Zend/ => class prefix is 'Zend_'
ZendX/ => class prefix is 'ZendX_'

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

没有评论: