One of the really cool things about the Component Application UI Block is the ObjectBuilder. The documentation for the CAB describes it as:
… a generic dependency injection system that can be used to manage complex object dependencies and help to decouple objects in complex systems. It is a new project that was created and inspired by the requirements of the Composite UI Application Block (CAB).
The impact of the ObjectBuilder system can be seen everywhere in the CAB. Use a [CreateNew] attribute to inject some dependent object and you’re using the ObjectBuilder. The really cool thing about the ObjectBuilder though is not that the CAB uses it (duh) but that you can too, either for your own reasons or to extend the functionality of the CAB, which is precisely what Mariano Szklanny has done.
Mariano has a pair of great posts here and here about using the ObjectBuilder to improve the injection of the State into child WorkItems. Not only is his final solution elegent, but it is exactly how the CAB uses it as well. His final solution is so seemless it might as well be part of the released CAB. That’s cool.
(It’s also cool, I think, that we’re finally seeing some good blogging about the CAB)