RE: [PHP-DEV] PHP: Coding/Programming/Development Standards/Guidelines

From: Date: Thu, 28 Dec 2000 11:49:03 +0000
Subject: RE: [PHP-DEV] PHP: Coding/Programming/Development Standards/Guidelines
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-42381@lists.php.net to get a copy of this message
Hi, This should have really have gone to php-general@ not to the developers list.. this list is for the developers OF PHP not people who develop WITH PHP. but... > Hello, > > Currently I am engaged in defining coding/programming standards and > guidelines for PHP-bases applications for my Intranet development team, > and I was just wondering, if there--by any chance--are already such > guidelines available. > > The purpose of these guidelines is to standardize our team development, > gain independence of the created applications from the actual developer, > thus being able to fill a gap if somebody drops out, to improve and ensure > quality in our applications. > > The following major areas should be covered: I havnt seen any documents of this sort but its fairly easy to get some guidlines > coding (PHP/HTML) HTML and PHP should be present in separate files using a good template parser.. > files (naming, content) Files should be named in the form template_parser.class (which should contain the class template_parser) for classes.. .inc for includes, .tmpl for templates, and .php for scripts. You can then set up apache to deny access to .inc's, .class's and .tmpl's > directory structure This really is up to you.. I normally go for /,/includes,/includes/classes,/templates and set the include path conviently so that they are all in the include path. > external/third party code Normally integrated into the current code.. never used any really. > reuseability Lots of comments.. use base classes which extend one another to provide similar but different functionality > debugging Have a global.inc that is include in every file and have Symbolic constants ON and OFF and then set $debug approriately then on production just make debug = OFF and dev debug = ON, then use if($debug == ON) { /* debug code here */ } > (screen) layout ??? > configuration See below > development environment Provide a dev server with the setup you want and make people use that (either via a VPN or shell). Provide a standard Editor and insit on constant indentation.. > > Has anybody ever heard of such a document? > > Any hint would be appreciated! Just find a nice document on coding in multideveloper enviroments from google or somthing and alter it to your needs. James

« previous php.dev (#42381) next »