Please share your favorite application design / design patterns for use in PHP with me. Some things I\'d like to know:
I imagine a lot of php developers have followed a similar route to mine: small scripts -> procedural/inline-code -> possibly a look at templating -> OOP -> then a framework. I think it may be quite common for a PHP developer to have "grown up" with PHP, learning design patterns to match the features available with the current version.
MVC is the most frequently used design pattern in the popular frameworks being used today. CakePHP is my framework of choice although Symphony and Zend are very popular too – it's well worth trying out a few and it'll soon become apparent which you feel most comfortable with.
For most projects (where rapid development and portable code are the priorities) I use Cake, however for light weight apps (one I developed recently was Good Baad) that you'd like to run fast (on low spec hardware) and do not need the bulk/weight added by the functionality of one of the large frameworks I recommend reading Rasmus Lerdorf's article on his No Framework PHP MVC framework.
Basically if you're after a true object oriented language that encourages beautiful code and the best design practices PHP is always going to lose out to the likes of Ruby Python and C#. But, PHP has its strengths e.g. no need for a templating language (it is one), PHP can run very fast and cheaply and does not need the weight of a large framework for all applications.
I'd encourage adopting a design pattern that takes the manageability of a design pattern like MVC and combine it with PHP's strengths.