I was looking into the development guidelines File Naming conventions and I have a suggestion:

 

I should mention that certain extentions output plain text from standard browsers which can be easily fixed.

Secondly the fix open an opportunity to expand and clarify the intention of the files by adding the intention in front of the file

 

Screen output files: filename.php

Process files: filename.php => process/filename.php or process.filename.php (with filename same as calling or pulling filename so you know what it relates to)

Includeble script block: filename.inc => inc.filename.php

Includeble functions: filenmame.inc => fie.filename.php or lib.filename.php (personally prefer the first)

Includeble classes: filename.class.php => class.filename.php

 

That way output is always empty + you know what’s in the file without opening it.

 

You basically can do the same for javascript:

Basic js file: filename.js

Included js file: filename.js.src => src.filename.js

 

You should also consider putting html comment tags around the javascript code (<!—code //à)  so it wont output if javascript is turned off.

To make sure javascript is turned on, you should consider disabling all process buttons and turning them on at runtime.

 

I haven’t looked at the database conventions, but what I personally always do is the following:

SELECT field FROM Table WHERE otherfield LIKE ‘value’ LIMIT 0,1;

As you can see sql-specific parts are in uppercase, fields in lowercase and table in ucfirst. This way you can separate what they are by simply looking how it’s written.

PS the LIMIT 0,1 (mysql) is a faster query then without, even when you know there can only be one value returned, as it stops looking after it’s found one which it wont if the limit is not there.

 

Note that it’s just a suggestion, which I’ve used myself for a few years now. Especially in complicated applications it’s proven to be very useful to me as it reduces time when searching for the wright file, even after some time has passed working on the application.

 

-----------------------

 

Wkr,

 

Dirk Rennen

 

KPN Belgium N.V.
Koningin Astridlaan 166
1780 Wemmel

Belgium