Loose coupling i.e. making your code modules less tightly bound to each other.
Dependency Injection helps this process, allowing clients of your code to get the application using their own code without them having to know very much at all as to how the application works internally.
The article linked in the title of this post has a very brief outline of some how it can work but basically I'm interested in using Interfaces and registering my own classes with the host application with the minimum possible code work.
There are lots of third party frameworks which provide implementations.
The method is usually the same, create and instance of the third party class and then call a method on it which tells the framework to run a particular concrete class that you have provided when a particular interface or type is used, it's a form of mapping allowing client classes to be used at runtime.
Comments
Dependency Injection helps this process, comes from C++, thats why it is to learn
- Tanya
Web Design Firm
The power which the language of C++ is being able to provide is surely the best when it comes to creating a website....
Well done keep up your efforts
Magento Themes
Commercial Buildings for Sale