Ian's Blog
Sunday, July 27. 2008Dependency Injection and Zend Framework ControllersTrackbacks
Testing models and controllers with Zend Framework: fake HTTP calls
Following last month's article by Ian, here's some thoughts on how to test a Zend Framework application. One of the unit testing best practices suggests to break dependencies, so you can test each component separately. The first problem that arises
Weblog: Ibuildings Blog
Tracked: Aug 29, 15:23 Comments
Display comments as
(Linear | Threaded)
Hopefully the Zend_Di componenet will be in the framework pretty soon http://tinyurl.com/56b929
Absolutely. Everything seemed to be a bit quiet on it at the moment, but having a proper configuration based container would be nice.
IMHO, Zend_Di is too complicated for inclusion in Zend Framework - the author admits as much in the comments to the proposal. Zend Framework prides itself on simplicity and, if its going to have a DI component (which I think would be a great addition) then this component needs to be really simple - something along the lines of PicoContainer. It should have one primary goal and that is to replace the use of Zend_Registry. There are several comments from me on the Zend_Di proposal explaining some ideas on how to create a dead-simple DI component for Zend Framework. I will try to summarize them on my blog and post the link here.
As promised:
http://bradley-holt.blogspot.com/2008/07/dependency-injection-in-zend-framework.html
I agree with Bradley - Dependency Injection must be seamlessly integrated into the framework and be part of its concept.
A rather promising framework I recently stumbled across is FLOW3: http://flow3.typo3.org
take a look at Garden, a DI framework for php5: http://garden.tigris.org
|
Blog










