Phingless workspace layout

Manuel Holtgrewe <[email protected]> Mon, 14 Mar 2005 01:00:30 +0100
Newsgroups gmane.comp.lib.binarycloud.devel
Message-ID <[email protected]>
Hi

We need a standard workspace layout and decide how workspaces are set 
up. The setup procedure will be automated later on, but for now we can 
live with creating the structure manually.

1.) Binarycloud's and vortex' location.

They should be located in the include_path. Setting the appropriate 
include_path is done in the workspace specific binarycloud.php (see below).

2.) Create workspace skelleton

Create a skelleton like the following:

   $BC_WORKSPACE/
     conf/
     htdocs/
     app/
       top/
         tpl/
         ndf/

Add a binarycloud.conf.xml with binarycloud's basic configuration and a 
datasources.conf.xml in $BC_WORKSPACE/conf. Place a index.ndf.xml file 
in $BC_WORKSPACE/app/top/ndf and a index.php in $WORKSPACE/htdocs using 
this NDF file to produce a page.

3.) Create the "bootstrap" file

Create a file called binarycloud.php in your htdocs/ directory and set 
it up to configure your environment:

3.1.) Define constants in there:

  * BC_BASE and BC_VORTEX with the paths to binarycloud and vortex.
  * BC_WORKSPACE with the path to your workspace so that "app/*" is 
includeable by "include_once".
  * BC_PATH_TMP with a path to a writeable directory. In testsite this 
will be $WORKSPACE/tmp but this can differ from installation to 
installation.
  * BC_PROJECT_NAME the name of the project

Project will set up more constants (BC_PATH_CACHE, BC_PATH_UPLOADS) 
based on these settings.

3.2.) Set the correct include_path

Use "set_include_path()" to append the path to binarycloud (so that 
'binarycloud/*' can be included with include_once), vortex and your 
workspace to the include_path.

========

We will put more initialization into the Project class:

  - set some constants (see above)
  - available languages come from binarycloud.conf.xml, the current 
language is provided by Project::getCurrentLanguage(), an array of all 
languages is provided by Project::getAllLanguages().


With such a setup, we should be able to run phingless pretty elegantly 
with run time caching.

The cache will be language dependant. This means that we have to know 
the available languages before caching configuration. We can solve this 
chicken-egg problem by making binarycloud.conf.xml and 
datasources.conf.xml not translateable - which should be no problem 
since they are only the most basic settings anyway.

Please examine all this critically since it will have a great inpact on 
the future of binarycloud ;)


Regards,

Manuel

-- 
GPG key: http://www.ggnore.net/~mholtgrewe/personal/files/public_key.asc
_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev