function filterInput() { }
function getElementById() { }
function widgetFactory() { }
Variables
With variables we have three variants
1. Database
The one used in the database which look like this: OrderList & OrderId.
2. PHP
And then we have the php variables that look like the following in most cases:
$camelCaps // Normal variable
$_SESSION['user-login']; // Label in array, should match DOM named elements.
function dbAddUser($ssnr,$mail,$password,$firstName,$lastName) { }
3. HTML
The things stored in session I believe should follow the same naming convention as our HTML does. such as user-login and user-password, however we won't get around that we'll have some different names at some places.
Split up
functions.php
into several smaller files to keep things organizedSuggestion
template.php
for thejaws_*()
functions.theme.php
for all the input-related and message/error functions.access.php
for the functions such asisAdmin()
,Userlogin()
&redirect()
.functions.php
ordata.php
for thegetX
andlistY
functionsFunctions Naming Convention
We should keep to one standard of naming functions. Right now the functions
UserLogin()
andUserRegister()
differ from everything else.The functions should also be verbs so
UserLogin()
could be better named simplylogin()
to be more descriptive.I suggest Zend Frameworks's version of naming functions.
Functions
Variables
With variables we have three variants
1. Database
The one used in the database which look like this:
OrderList
&OrderId
.2. PHP
And then we have the php variables that look like the following in most cases:
3. HTML
The things stored in session I believe should follow the same naming convention as our HTML does. such as
user-login
anduser-password
, however we won't get around that we'll have some different names at some places.which then would give us