12Nov/091
Why I am not running to Solar
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.
November 13th, 2009 - 08:38
A universal construction doesn’t imply that the class inherits from a base whatever class. I think they are trying to standardize on an API rather. Which is a good thing for a framework.
This is not a DI container either. It’s a much simpler, easier pattern. And also, it’s meant to be used for classes/components which require configuration. It won’t be forced on code where this is not necessary.
In any way, you should get involved in the discussion! It’s the right time.