[cvs] [Wiki] changed: Doc/Dev/Libraries
Chuck Hagenbuch
chuck at horde.org
Sat Jul 5 01:58:11 UTC 2008
chuck Fri, 04 Jul 2008 21:58:10 -0400
Modified page: http://wiki.horde.org/Doc/Dev/Libraries
New Revision: 1.1
Change log: first real documentation of horde 4 package structure
@@ -1,5 +1,88 @@
+[[toc]]
+
+ Horde Library Structure
This page will document the structure of Horde 4 framework libraries
(or any other library using Horde's coding standards and directory
organization).
-TODO
+++ lib/
+
+Contains source files. The full directory path should be represented
here, so if the package name is Horde_Xml_Element, the structure would
be:
+
+<code>
+lib/
+ Horde/
+ Xml/
+ Element/
+ ...
+ Element.php
+</code>
+
+++ data/
+
+Contains data files, such as SQL scripts.
+
+++ doc/
+
+Contains documentation files. Similar to lib/, the full tree is represented.
+
+++ examples/
+
+Contains example files.
+
+++ script/
+
+Contains command-line scripts
+
+++ test/
+
+Contains fixtures and PHPUnit tests. Follows the same full-tree approach.
+
+++ Example Structure
+
+Following these rules, a theoretical package with all of these kinds
of files named Horde_Some_Package would look like this:
+
+<code>
+Some_Package/
+ data/
+ Horde/
+ Some/
+ Package/
+ horde_something.sql
+
+ doc/
+ Horde/
+ Some/
+ Package/
+ docbook.xml
+ manual.txt
+
+ examples/
+ Horde/
+ Some/
+ Package/
+ how_to_do_something.php
+
+ lib/
+ Horde/
+ Some/
+ Package/
+ Adapter/
+ Base.php
+ Doohickey.php
+ Package.php
+
+ script/
+ Horde/
+ Some/
+ Package/
+ dosomething
+
+ test/
+ Horde/
+ Some/
+ Package/
+ AllTests.php
+ SomeTest.php
+</code>
+
+This may look a bit unwieldy, but the benefit of it is that you can
unzip multiple packages in the same top level directory and have all
of their files fall correctly in to place.
More information about the cvs
mailing list