Re: File Naming Conventions

From: Date: Thu, 09 Jan 2003 20:13:11 +0000
Subject: Re: File Naming Conventions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12199@lists.php.net to get a copy of this message
My intent is that all documentation for $package is installed in $doc_dir/$package/. So for the HTML_TreeMenu package it would be: /usr/local/lib/php/docs/HTML_TreeMenu/example.php The installer takes care of this, but you may have to use the baseinstalldir attribute to avoid too many extra levels of directories in there. - Stig On Sun, 2003-01-05 at 10:53, Lorenzo Alberton wrote: > I've noticed that there aren't any standards about example/test/doc > file naming, so common names as "test.php", "example.php", > "readme", > etc. are often used. This is fine until there are other packages in the > same category, that usually have a "readme" or "test.php" as well. > > Here I propose a naming standard for [ docs | tests | examples] files, > which IMHO should be at least prefixed by package name, > if nothing else. > > Just have a look: > > Net_Ident/examples/example.php > Net_Url/docs/example.php > Net_UserAgent/tests/example.php > > once installed, the directory structure would be: > > Net > | > +-docs/example.php > | > +-examples/example.php > | > +-tests/example.php > > Now, tell me which "example.php" refers to what package, > without opening the files... > > > Another example: > > HTML_TreeMenu has a documentation file stored in > HTML/docs/example.php > > What if a new HTML_whatever package had a file called > "example.php" in the "docs" dir? > > I'm sure you got the idea... > > A good naming example could be the one adopted by HTML_QuickForm: > /docs/QuickForm_exampleX.php > > or by HTTP_Upload: > /docs/upload_example.php > > once installed, the dir structure would be: > HTTP > | > +-docs > | > +-QuickForm_exampleX.php > | > +-upload_example.php > > look, this is not ambiguous! > > I propose the "<package_name>_<whatever>" naming convention, but > even stricter rules such as > "<package_name>_<doc | example | test>_<number>" > could be "A good thing"(TM). > > However this email purpose is just to gather some ideas. > Comments are welcome. > > Best regards, > Lorenzo > > --- > [Quipo ISP - Questa E-mail e' stata controllata dal programma Declude Virus] > [Quipo ISP - This E-mail was scanned for viruses by Declude Virus] >

« previous php.pear.dev (#12199) next »