Snippets

Jahidul Islam Naming Conventions

Updated by Jahidul Islam

File Naming Conventions.txt Modified

  • Ignore whitespace
  • Hide word diff
 			if($gender == 'mail'){
 				// do something
 			}
+			
+	FOLDER :
+		-> SNAKE CASE
+		-> LOWER CASE
+		-> DO NOT USE SPACE & SPECIAL CHARECTER
+		-> EXAMPLE : walton_s7, walton_primo, banner_image
 	
 		
Created by Jahidul Islam

File Naming Conventions.txt Added

  • Ignore whitespace
  • Hide word diff
+Naming Conventions
+
+	VARIABLES : 
+		-> SNAKE CASE
+		-> LOWER CASE
+		-> SHOULD NOT BE AMBIGUOUS
+		-> EXAMPLE : $first_name, $lastName
+		
+	CONSTANTS : 
+		-> SNAKE CASE
+		-> UPPER CASE
+		-> SHOULD NOT BE AMBIGUOUS
+		-> EXAMPLE : DB_NAME, DB_PASSWORD, DB_HOST
+	
+	FUNCTIONS & METHODS : 
+		-> CAMMEL CASE
+		-> SHOULD NOT BE AMBIGUOUS
+		-> FUNCTIONS SHOULD ALWAYS START WITH A "VERB"
+		-> EXAMPLE : getName() , connectToDatabase(), sendEmail()
+	
+	CLASS : 
+		-> PASCAL CASE
+		-> SHOULD NOT BE AMBIGUOUS
+		-> EXAMPLE : Circle, User, Mail
+		
+	PRIVATE & PROTECTED PROPERTIES : 
+		-> CAMMEL CASE
+		-> SHOULD NOT BE AMBIGUOUS
+		-> MUST BE PREFIXED WITH A SINGLE UNDERSCORE
+		-> EXAMPLE : private $_radius;, private function _calculateArea(){}
+		
+	PARENTHESES : 
+		-> K&R Style
+		-> EXAMPLE : 
+			if($gender == 'mail'){
+				// do something
+			}
+	
+