Dependency injection is a technique that separates behavior from dependency resolution. Various frameworks have emerged for that purpose, but for small projects, using them might be an overkill. Check out the tutorial on how to perform DI manually.
- Posted by: Fabrizio Chami
- Posted on: December 21 2010 02:28 EST
If you're using scala try the cake pattern. Its delicious http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di.html