Comments on: Dependency Injection in Zend Framework http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/ Mon, 29 Sep 2014 19:50:55 +0000 hourly 1 https://wordpress.org/?v=4.6.1 By: bradley-holt http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/comment-page-1/#comment-139 Tue, 29 Jul 2008 20:32:00 +0000 http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/#comment-139 Ivo – thanks! I tried to think of a more specific name but couldn’t come up with anything that I liked. I’d like to avoid putting DI or IOC in the name as that focuses on what the component does, not what the component is. Do you have any suggestions for a more specific name?

]]>
By: Ivo http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/comment-page-1/#comment-138 Tue, 29 Jul 2008 20:04:00 +0000 http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/#comment-138 Very interesting proposal! I would like to recommend choosing a slightly less generic name though. Zend_Container can mean so many different things to different people, that I think a more specific name would be appropriate.

]]>
By: bradley-holt http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/comment-page-1/#comment-137 Tue, 29 Jul 2008 19:00:00 +0000 http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/#comment-137 phpimpact – I’m not completely convinced that Zend Framework users are ready for a dependency injection container. The very concept of dependency injection may be too complicated for Zend Framework which does a fabulous job of balancing simplicity and power. What I mean is that dependency injection may be too complicated for the power it provides. That’s why I’m advocating for a container that is as simple as possible and has very clear and narrow use cases. IMHO, the simpler the container the more likely it is to be a good fit for Zend Framework.

]]>
By: phpimpact http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/comment-page-1/#comment-136 Tue, 29 Jul 2008 16:33:00 +0000 http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/#comment-136 I agree, one of the goals is to replace Zend_Registry, so a simple container should do the work. In fact, that’s the reason why I proposed Zend_Di in the first place, Zend_Registry didn’t allow me to have local containers. I’ve been trying to push this idea forward for almost a year now. And I think it’s great that you got involved, you know this guys, and you can make this happen. And that’s what we want right?

]]>
By: bradley-holt http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/comment-page-1/#comment-135 Tue, 29 Jul 2008 12:01:00 +0000 http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/#comment-135 wllm – thanks for your interest! I’ve created a draft proposal and will post more details when it’s ready. Yes, Zend_Reflection would be very helpful (especially DocBlock reflection).

mike – thanks! I’ll post more when the draft proposal is ready.

phpimpact – sorry, I didn’t mean to say that Zend_Di is useless. I just think it has too many features and is too complicated for Zend Framework (at least at this time). As you say, Zend_Di is, in fact, the inspiration for this proposal. Also, the proposal I’m writing is just a draft and has in no way been approved by anyone at Zend.

Ian Barber – good ideas. I would definitely like a way to declare required dependencies and perhaps even optional dependencies. I was thinking of trying to use DocBlock tags for this.

]]>
By: Ian Barber http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/comment-page-1/#comment-134 Tue, 29 Jul 2008 08:47:00 +0000 http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/#comment-134 Interesting idea! I wonder if there isn’t a way to use interfaces though, perhaps have a standard (blank) interface than users can extend, and only the setters in that interface on a given object are treated as dependency setters, in case people are using getters and setters for non-dependency properties, as is pretty common.

Could even have two sets, for required and available (though perhaps that would be a little awkward).

]]>
By: phpimpact http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/comment-page-1/#comment-133 Tue, 29 Jul 2008 08:30:00 +0000 http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/#comment-133 Finally a good news. I’m glad Zend_Di has inspired you to write a similar component. Don’t write a simple DI container, is useless, look at the bigger picture, modules (models, controllers). I’m glad your friend Matthew has finally authorised this. I’ll be helping you with the proposal.

]]>
By: mike http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/comment-page-1/#comment-132 Mon, 28 Jul 2008 22:15:00 +0000 http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/#comment-132 Great to see that someone is picking up DI again since the Zend_Di Proposal is archieved.
I’ll definitly keep an eye on your proposal. 🙂

]]>
By: wllm http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/comment-page-1/#comment-131 Mon, 28 Jul 2008 21:41:00 +0000 http://bradley-holt.com/2008/07/dependency-injection-in-zend-framework/#comment-131 More details! Please create a proposal. 🙂
Also, take a look at Ralph’s Zend_Reflection component for any reflection capability you may need. He’s adding something for docblocks specifically.

]]>