The Zend Framework and Dependency Injection

Padraic has posted about Dependency Injection and Zend Framework:

When you start mucking about with objects you eventually realise that the best way to get objects working together towards a unified objective, is through composition. In other words, objects use other objects, which in turn can use others. You end up not with a restrictive inheritance tree, but a pool of objects injected into each other to build up an overall purpose. The problem of course is how to inject one object into another!

Padraic talks about what dependency injection is and why it is so good and how to use it for testing your code. Well worth a read.

Posted by Rob on 5th February 2008 under Around the web |

Comments RSS

Leave a Reply