File Naming Conventions

From: Date: Sun, 05 Jan 2003 09:53:01 +0000
Subject: File Naming Conventions
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12123@lists.php.net to get a copy of this message
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 (#12123) next »