[Solar-talk] Project structure layout?
Paul M Jones
pmjones at solarphp.com
Tue Nov 13 07:27:19 CST 2007
Hi guys --
A while back, we talked about making the Solar directory structure
slightly more friendly to SVN externals, so that you could link to a
particular Solar revision in your project. I have a kind-of solution
to this that doesn't involve restructuring Solar; instead, we might
be able to have a standard project structure that works for
libraries, configuration, deployment, etc.
Here's the outline. It's built on implementation ideas from Clay
Loveless, but uses PEAR file-role names as the directory names.
Assume that this structure lives in "trunk" for your project.
ext/ # svn externals for this project
solar/ # http://solarphp.com/svn/trunk
Solar.php
Solar/
bin/
docs/
tests/
example/ # http://example.com/svn/trunk
Example.php
Example/
bin/
docs/
tests/
php/ # unified include-path
Project.php # arch-class for this project
Project/ # files for this project
Solar.php # ln -s ../ext/solar/Solar.php
Solar/ # ln -s ../ext/solar/Solar
Example.php # ln -s ../ext/example/Example.php
Example/ # ln -s ../ext/example/Example
bin/ # cli scripts for this project
cfg/ # config files for this project
Solar.config.php
www/ # link to this from /var/www/htdocs
index.php # bootstrap
public/ # public dir
Project/ # ln -s ../../php/Project/App/Public
Solar/ # ln -s ../../ext/solar/Solar/App/Public
Example/ # ln -s ../../ext/vendor/Vendor/App/Public
So your project (in SVN) can have as many externals as you like, and
those externals can use any structure at all. Then you symlink to
the externals from the `php` directory (which will be your
include_path) or anywhere else you need to link from.
Comments, criticism, analysis?
-- pmj
More information about the Solar-talk
mailing list