Learning Concrete5 php and database naming conventions ( 77 )

 

 

As any start, to write code you need to understand the naming conventions. Concrete5 code is very well writen as OOP code but takes a while till every one realize the conventions meaning and how to read C5 code.
For those that are interested to learn concrete5 and c5 naming conventions, I wrote two lists, containing naming conventions, php naming conventions list came from my code observation, I didn't found this on other webs I thing helps a lot, the database naming conventions list came from concrete5.org oficial website, but I rearranged the columns and I merged two list in one. Also php variable names can have multiple meanings, for example like $v, which can be View or Value.

PHP NAMING CONVENTIONS


/*
$a 		- Area
$af		- Attribute Form Helper
$ak 		- Attribute Key
$akCat 		- Attribute Key Category
$al 		- Asset Library
$arr		- Array
$atType 	- Attribute Type
$av 		- Attribute Value
$b 		- Block
$bt 		- Block Type
$btHandle 	- Block Type Handle
$c 		- Collection / Page 
$ch		- Countries Helper (Location)
$data 		- Array()
$db 		- Database
$dtt		- Date Time Helper
$eh 		- Encryption Helper
$f		- File
$fh		- File Helper
$fi 		- File Importer
$fl 		- File List
$fp 		- File Permissions
$fs 		- File Set
$fsf 		- File To Set
$ft 		- File Type List
$fv 		- File Version
$g 		- Group
$id		- Identifier Helper
$ih		- Interface Helper
$im		- Image
$lh		- Language Helper
$mh		- Mail Helper
$nh 		- Navigation Helper
$p		- Permissions
$pkg 		- Package
$pl		- Page List
$pt 		- Page Collection Type
$r		- Database Row / Response
$rh		- Ratings Helper
$rs		- Response
$sa 		- Select Attribute 
$sh		- States Helper (Location)
$src		- Source
$stm 		- Stacklist
$th		- Text Helper
$tp 		- Task Permission
$u 		- User
$uak		- User Attribute Key
$uh		- URL Helper
$ui 		- User Info
$v 		- View / Value
$val		- Validation Helper
*/

DATABASE NAMING CONVENTIONS

/*
Prefix			Description

B LONGBLOB BLOB (binary large object) C VARCHAR Varchar, capped to 255 characters. C2 VARCHAR Multibyte varchar D DATE Date F DOUBLE Floating point number I INTEGER Integer (mapped to I4) I1 TINYINT 1-byte integer I2 SMALLINT 2-byte integer I4 INTEGER 4-byte integer I8 BIGINT 8-byte integer L - Integer field suitable for storing N NUMERIC Numeric or decimal number T DATETIME Datetime or Timestamp TS DATETIME Date & Time X TEXT Larger varchar, capped to 4000 characters X2 LONGTEXT Multibyte varchar (largest size) XL LONGTEXT For Oracle, returns CLOB, */

Links References about database naming conventions: http://www.concrete5.org/documentation/how-tos/developers/creating-and-working-with-db-xml-files/ http://www.concrete5.org/documentation/developers/system/database-connectivity
Oder concrete5 useful links:
concrete5 Documentation http://www.concrete5.org/documentation/developers/
concrete5 API Documentation Doxygen http://docs.tripleiweb.ca/ http://docs.mnkras.com/
C5 Cheat Sheet http://www.weblicating.com/doku/doku.php?id=cheatsheet/#.Uo3ie8TrwpU
Concrete5 Cheat Sheet for Designers http://www.sarahevansdesigns.co.uk/blog/concrete5-cheat-sheet-designers/