http://blogs.clariusconsulting.net/kzu

Daniel Cazzulino's Blog

Go Back to
kzu′s Latest post

Funq: screencast series on how to build a DI container using TDD

Over the past few days, I spent some time recording the experience of building a dependency injection container using test driven development. It was a cool experience for me, and I hope you find the screencasts useful.

Here are all the episode links:

  1. Part I: selecting a high performance approach and building the basics with few lines of code. View | Download
  2. Part II: adding support for passing constructor arguments to resolved instances. View | Download
  3. Part III: adding named services and refactoring to improve code. View | Download
  4. Part IV: add support for instance reuse. View | Download
  5. Part V: adding support for container hierarchies. View | Download
  6. Part VI: adding deterministic disposal of container hierarchies and instances created by them. View | Download
  7. Part VII: polishing a fluent API. View | Download
  8. Part VIII: adding support for initializer functions. View | Download
  9. Part IX: how well does it perform really? View | Download

 

Funq is by no means a revolutionary concept to DI, I’m well aware of that. But it’s one that takes a minimalistic approach to keep the performance impact of DI to a bare minimum. One of the project core requirements was to perform very well on the Compact Framework, as part of its inclusion in the upcoming Mobile Client Software Factory v2 from patterns & practices.

I hope this series serves to understand the inner workings of this fully functional yet extremely simple DI container.

 

[Update 3/10/2011]: I’ve been told these videos are being used also to showcase how to do TDD in a real-world scenario, which is quite gratifying. And I’ve just checked Amazon Cloud Front (which I use to make the downloads available to you at the fastest possible speeds without breaking the bank) and it’s still consistently delivering ~4GB/month of downloads across the globe (top EU, then USA).

I also learned I can embed the videos right here, so here they are :)

Loading
Loading Viddler Videos

    Powered By Viddler


    Comments