Week 5
Picking up where we left off
- Start with last week's code
This week's two-part mission
- Clean up our mess
- Create a product admin section
Separating our Logic from our Presentation
- Why we want to do it
- PHP OOP Basics
- classes
- encapsulation
- inheritance
- properties
- methods
- scope
- public
- private
- protected
- final
- contructors and destructors
- static class members
- classes
- Create Template handler
- Refactor index.php and detail.php to use templates
Stupid .htaccess Tricks
- Basic authentication with htpasswd
- Custom URLs with mod_rewrite
- Restrict access to includes directory
The Joy of CRUD
- Create admin/products.php
- Create action
- Read actions
- Update action
- Delete action
Bonus: File Uploads
- Upload product image
Further Reading
- Related Chapters in the Book: 2, 6, 14, 19
Homework
What do you want to know about that we haven't covered yet? Email me your questions and we'll talk about them next week.