We recently had a project at work that involved replacing all the relative URL's from the application with absolute URL's. In the past, developers had just hard-coded an absolute URL only when they need to force the browser over to https. Now we are using multiple subdomains, so this approach is no longer sufficient. We also wanted a way to easy rotate assets through multiple CDN URL's to speed up the time it takes a user's web browser to load all the content.
It has been said that all languages, over time, implement a dialect of lisp. PHP appears to be no exception.
If you separate your business logic from your data access logic, the last thing you want to do is make your business logic unit tests reliant on the database. This is normally not a big deal: retrieve the data, store it in an array and pass it off to the class with the business logic. Mocking the data for the unit test simply requires you to hardcode from array information in the test. However, I recently ran into a case where I wanted to pass Zend_Db_Table_Row and Zend_Db_Table_Row objects to the business logic and mocking them was not so easy.
I will be giving a short presentation on HauteLook's architecture at the LA LAMP meetup on January 20th. I have been meaning to join a user group for some time, so this worked out perfectly. Any developers in the LA area on that day should come, even if it is just for the free food and beer.
The Zend Framework ships with SOAP functionality and one especially neat class called Zend_Soap_AutoDiscover. This class uses a comment docblock to auto-generate a WSDL at runtime. I won't go into the details how it works here, but you can check the Zend Framework documentation for an example. When using this class at work, I noticed the WSDL would not always generate correctly. After a lot of digging around, I found the cause: eAccelerator.
Some of my thoughts on Paul M. Jones post about Solar and Zend Framework. This is less of a defense of Zend Framework and more of a commentary on Paul's framework ideas.
I favor design by contract so I can properly type-hint method parameters. A framework should be written in a way I can safely extend the crap out of. This is the exact use case of interfaces.
Universal constructors make the code harder to read. I see this as a sign that inheritance is being used way too much. Compose people, compose!
The registry pattern is not any better than a singleton. They both have global scope.
I do like that there are so many ways to inject dependencies. The MVC framework is also pretty nice.
Stefan Esser gave a presentation on Secure Programming with the Zend Framework at the 2009 Dutch PHP Conference. While the presentation was good, one thing that bothered me was the way authentication was being handled.