Via Raible Designs, check out this WebWork Tutorial. It does make it look easy.
After reading this I think I'm just about conceptually ready to write the "Actions" parts of my CMS that do form processing, validation, etc. Then I'll finally be able to write the backend for my CMS.
Some of the things in that tutorial make me jealous of some of the features PHP doesn't have. Like clean iterators. Instead of being able to say
#foreach($error in $errors)
I have to say stuff like:
while($error = $errors->next()){
but PHP5 will allow you to make standard iterators.
Other stuff that PHP 5 will have that I want are interfaces/abstract classes and access protection (PPP). In my CMS I've been wanting to have similar classes derive from a base class (all Modules are derived from Module, all Iterators are derived from Iterator), etc. Regarding the Actions in this article, I'd like to have all actions inherit from a base Action class so that all Action subclasses are forced to implement methods like "validate", etc. But there's so much less incentive when there's nothing to force a derived class to implement methods in an abstract base class or interface.
So yeah, I'm looking forward to PHP 5.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):