Good Practice in PHP Or "Things I Wish New Recruits Knew"
About Me Lorna Mitchell
Twitter: @lornajane
PHP consultant, trainer, and author
I live in Leeds
Website:  http://lornajane.net
Book:  http://sitepoint.com/books/phppro
Today's Outline Software Development Lifecycle
Databases
Source Control
Documentation
Open Source
Software Lifecycles
Waterfall
Waterfall
Agile Many different interpretations
Some or all of: iterative
customer involvement
product is always working
done in bursts called "sprints"
spec can change (in a controlled way)
Databases
Databases Not a dumping ground
Often your application bottleneck
Worth understanding
Tools phpMyAdmin http://phpmyadmin.net Command Line powerful
well-documented
Normalised Forms Guidelines for good table design
1 st  Normal Form no repeating groups (e.g. comma separated lists) 2 nd  Normal Form decouples entities and links them by relationship (e.g. customer data separate from order) 3 rd  Normal Form <- good enough! removes redundancy and dependent information
Indices An index allows MySQL to quickly find things
Foreign key contstraints
Columns used in where clauses
EXPLAIN MySQL command
Which indexes are used
What kind of indexes
Number of rows scanned
Great for diagnosing slow queries
Source Control

Things I wish web graduates knew