A few tips on how to go to the next level in PHP web application development. Tells about SCM, code convention, code testing, DRY, etc. Targeted towards the new PHPers who have worked for around 6-12 months.
1. Becoming a PHP ninja
Md. Emran Hasan
emran@rightbrainsolution.com
2. About me
<about>
Doing PHP for 5+ years
Developer, consultant, manager
CTO, Right Brain Solution Ltd.
Previous: SWI, Pageflakes, Trippert Labs.
</about>
9. 2. Code Commenting
• Reduced code understanding time
• Serves as a documentation
• Answer the question: WHY??
10. /**
* Add number
*
* This function will take two integer numbers and will
* return the addition result of them.
*
* @param int first number
* @param int second number
* @return int addition result
*/
function addNumbers($firstNum, $secondNum)
11. 3. Code re-use
• Re-use code across projects
• Refactor every now & then
• Don’t Repeat Yourself (DRY)
12. 4. Code testing
• Gives confidence
• Unit testing in rescue
• Test Driven Development (TDD)