(on Friday, 21 November 2008, 02:19 PM -0800):
> Thanks Matthew for your comment.
>
> I`m following ZF coding standards and the structure itself is clear for me.
> I just can`t see where the library in the example (in proposal) is shared
> for all projects (project != module)
Typically, I pull in different libraries into my library/ directory
using svn:exernals or git submodules. This allows you to version those
separately, and re-use the code in different projects. Alternately, you
can have these libraries installed elsewhere, and then simply symlink
them into your project's library/ directory.
Basically library/ signifies code that is not specific to the project,
but which *is* consumed by it.
> In the proposal I see shortly something like this:
> <project name>/
> application/
> ...
> library/
>
> So it looks like library is for "project name" only, isn`t it? Of course the
> project may contain many modules. But on the same level where project_name
> is I may want to have next project_name with another modules. Just a few
> separate projects.
Yes, these are separate directories, and will have tree structures that
roughly mirror each other. What I am suggesting is that the directories
under library/ will likely either exist elsewhere on your system and
your projects will symlink to them, or the directories will be served
via svn:externals or some similar system.
> To have library dir shared for both projects I should remove library dir
> from project name to the root path where each project is so:
>
> root/
> library/
> project_x/
> project_y/
>
> right?
You can certainly also do like the above. The library/ directory does
not *have* to be inside the given project; it simply needs to be on the
include_path. If you have many projects using the same library code, and
they all use the same versions of that library code, this is a very
viable solution.
> Maybe I`m just missing something in this structure :/
> Thanks for clarification
>
> P.S.
> doing
> root/
> application/
> project_x/
> project_y/
> library/
> public/
> project_x/
> project_y/
>
> is easier to set one access for each project by assigning privilages to
> public dir only. The rest root dirs are not accessible from outside.
ZF is certainly flexible enough to do the above, but it falls outside
our recommendations, and would require substantial configuration to
achieve.
--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/
没有评论:
发表评论