<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>Andrey Shchekin's Blog - Latest Comments in Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://ashmind.disqus.com/</link><description></description><language>en</language><lastBuildDate>Sun, 06 Dec 2009 01:45:25 -0000</lastBuildDate><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-24934976</link><description>Awesome, thank you for sharing.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Angelreisen</dc:creator><pubDate>Sun, 06 Dec 2009 01:45:25 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-24325797</link><description>I think frameworks a little bit complicated, but it does an awesome job for sure.&lt;br&gt;Thanks for sharing.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alleinunterhalter Köln</dc:creator><pubDate>Mon, 30 Nov 2009 06:06:58 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-19485790</link><description>I see what you are trying to achieve more as MEF/System.AddIn functionality than as basic IoC.&lt;br&gt;&lt;br&gt;I will look at it when time allows, in the meanwhile you can use test suite at&lt;br&gt;&lt;a href="http://code.google.com/p/net-ioc-frameworks/" rel="nofollow"&gt;http://code.google.com/p/net-ioc-frameworks/&lt;/a&gt;&lt;br&gt;to see how it corresponds to common IoC features.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ashmind</dc:creator><pubDate>Thu, 08 Oct 2009 04:58:41 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-19428682</link><description>Please, cay you see my framework &lt;a href="http://plugins.codeplex.com" rel="nofollow"&gt;http://plugins.codeplex.com&lt;/a&gt;. I'm luck of time so it hadn't been documented yet, but i'm very interested in comparison to other frameworks.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">hack2root</dc:creator><pubDate>Wed, 07 Oct 2009 12:57:28 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-12857515</link><description>awesome articel, thanks for sharing  but sometimes frameworks are a bit difficult.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Veyton</dc:creator><pubDate>Fri, 17 Jul 2009 21:02:48 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-4789385</link><description>Fantastic comparison. Thanks for sharing</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pavan Kulkarni</dc:creator><pubDate>Tue, 30 Dec 2008 19:02:18 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-4332046</link><description>Really like the overview and nice comparison too!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">dewaji</dc:creator><pubDate>Thu, 11 Dec 2008 14:22:23 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2982644</link><description>Great review!  This is exactly what I was looking for to help clear things up for me.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric J. Smith</dc:creator><pubDate>Fri, 10 Oct 2008 12:24:10 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2622911</link><description>Good review, thanks for taking the time to do it.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Colin Jack</dc:creator><pubDate>Thu, 25 Sep 2008 05:26:16 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2621226</link><description>The use case is to create a factory which registers several factory-specific components without polluting the original container with these components and their local scope dependencies (such as connection data). I describe the problem in detail at  &lt;a href="http://blog.ashmind.com/index.php/2008/06/23/di-framework-challenges-1-simple-factories/" rel="nofollow"&gt;http://blog.ashmind.com/index.php/2008/06/23/di...&lt;/a&gt; .&lt;br&gt;&lt;br&gt;So, if I can create a container in place and then throw it away, it also solves the pollution problem.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ashmind</dc:creator><pubDate>Thu, 25 Sep 2008 02:29:47 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2589469</link><description>On IService[] - point taken, issue raised. In the meantime you can do:&lt;br&gt;&lt;br&gt;builder.Register(c =&amp;gt; c.Resolve&amp;lt;IEnumerable&amp;lt;X&amp;gt;&amp;gt;().ToArray());&lt;br&gt;&lt;br&gt;..in order to adapt the default collection type onto an array type.&lt;br&gt;&lt;br&gt;I'll look into the non-generic collection registrations - may look into that in the future if there is demand.&lt;br&gt;&lt;br&gt;Thanks for the feedback!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nicholas Blumhardt</dc:creator><pubDate>Wed, 24 Sep 2008 23:29:51 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2578161</link><description>The net effect is almost the same. RegisterTypesMatching() and RegisterTypesAssignableTo() are lazy - there is no scan of loaded assemblies, for instance.&lt;br&gt;&lt;br&gt;You could always create an extension method ResolveUnregistered() which could check/register first, too.&lt;br&gt;&lt;br&gt;Not sure what you mean about hierarchical containers relating to this use case - can you clarify a little?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nicholas Blumhardt</dc:creator><pubDate>Wed, 24 Sep 2008 17:12:26 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2541361</link><description>Definitely not all, I think I'll add a test for that at some point.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ashmind</dc:creator><pubDate>Tue, 23 Sep 2008 10:28:36 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2539357</link><description>Nice comparison! I didn't know that there where so many IoC frameworks :)&lt;br&gt;&lt;br&gt;Do you know if all containers support registering services/components at any given time?&lt;br&gt;I know Castle can do that, i'm abusing it a bit in my current project.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">alwin</dc:creator><pubDate>Tue, 23 Sep 2008 06:43:11 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2539227</link><description>Sure, I like the second approach much more.&lt;br&gt;&lt;br&gt;By the way, is it possible to resolve unregistered types in Autofac?&lt;br&gt;I do not feel that is very important, given hierarchical containers, but I am still interested.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ashmind</dc:creator><pubDate>Tue, 23 Sep 2008 06:11:07 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2539207</link><description>Thanks!&lt;br&gt;&lt;br&gt;You have a very interesting implementation.&lt;br&gt;I would prefer to have an automatic registration by default, since if I get into situation where I would need more than one ILogger collection, I would probably use some kind of contextual override for a requiring component anyway. But it is a question of preference.&lt;br&gt;&lt;br&gt;There are only two things that I feel are missing in your implementation -- support for IService[] (since it is simplest way to define collection dependency) and and ability to register collections using non-generic API.&lt;br&gt;&lt;br&gt;Due to the first one, I can not update tests to pass right now, however, I had fixed the chart and will fix the post text as well.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ashmind</dc:creator><pubDate>Tue, 23 Sep 2008 06:07:50 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2525027</link><description>Cool, great work!&lt;br&gt;&lt;br&gt;I think I can't update in-post chart, since it'll require me to update post text as well, and that would mean I have to consider and mention all other framework updates.&lt;br&gt;I am looking for a way to keep an up-to-date version of charts at the net-ioc-frameworks page of Google Code, I hope to do it soon enough.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ashmind</dc:creator><pubDate>Mon, 22 Sep 2008 16:50:55 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2520137</link><description>Aaah - and regarding automatic registration - you can always do:&lt;br&gt;&lt;br&gt;builder.RegisterTypesAssignableTo&amp;lt;object&amp;gt;();&lt;br&gt;&lt;br&gt;:) Not really recommendable though.&lt;br&gt;&lt;br&gt;I recently ported some Prism code from Unity to Autofac, and used something similar to:&lt;br&gt;&lt;br&gt;builder.RegisterTypesMatching(t =&amp;gt; t.Name.EndsWith("View"));&lt;br&gt;&lt;br&gt;--- just to illustrate that there is no need to use tagging interfaces or inheritance in order to work with this feature.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nicholas Blumhardt</dc:creator><pubDate>Mon, 22 Sep 2008 10:42:40 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2520060</link><description>Hi Andrey,&lt;br&gt;&lt;br&gt;Wow! It is very interesting to see a methodical approach to this comparison.&lt;br&gt;&lt;br&gt;Autofac does also support list registrations - but like 'resolve anything' you have to opt-in. See: &lt;a href="http://code.google.com/p/autofac/wiki/Collections" rel="nofollow"&gt;http://code.google.com/p/autofac/wiki/Collections&lt;/a&gt;.&lt;br&gt;&lt;br&gt;As you've hinted at - like most containers you can change this behaviour by writing custom extensions. In general, you'll find Autofac is very conservative about working absolutely predictably by default.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;&lt;br&gt;Nick</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nicholas Blumhardt</dc:creator><pubDate>Mon, 22 Sep 2008 10:36:11 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2515363</link><description>Hi Andrey,&lt;br&gt;&lt;br&gt;If you take a look at the updated version of your test project, you'll notice that LinFu passes every test in both "MustHave" and "ShouldHave" categories--all from an assembly that is only about 94KB in size! :)&lt;br&gt;&lt;br&gt;If you can, please update your charts accordingly. Thanks!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Philip Laureano</dc:creator><pubDate>Mon, 22 Sep 2008 02:34:52 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2506115</link><description>Good idea! I supposed that all frameworks that support list injection for constructors support them for properties as well.&lt;br&gt;But documenting assumptions this in a testable way is always a good idea. I'll do this.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ashmind</dc:creator><pubDate>Sun, 21 Sep 2008 05:39:20 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2506100</link><description>Thanks, Andrey! I went ahead and added the LinFuAdapter to the test suite.&lt;br&gt;&lt;br&gt;Btw, you might want to add property service list injection as one of the "should haves" for IoC container features. For example, if I have a service instance with a property such as:&lt;br&gt;&lt;br&gt;[SomeCustomPropertyInjectionAttribute] // This differs with every IoC container&lt;br&gt;public ISomeServices[] MyServices { get; set; }&lt;br&gt;&lt;br&gt;It would be nice to have the container automatically instantiate the existing list of ISomeService instances from the container and inject it to the MyServices property. What do you think?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Philip Laureano</dc:creator><pubDate>Sun, 21 Sep 2008 05:35:47 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2506088</link><description>Sure, it's a thing I forgot to do correctly.&lt;br&gt;There is already a Create&amp;lt;T&amp;gt; method in the IFrameworkAdapter, but test did not use it.&lt;br&gt;I have just modified the test to use Create&amp;lt;T&amp;gt; instead of Resolve&amp;lt;T&amp;gt;.&lt;br&gt;&lt;br&gt;So get the latest version, then implement Create&amp;lt;T&amp;gt; using AutoCreate.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ashmind</dc:creator><pubDate>Sun, 21 Sep 2008 05:31:09 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2505974</link><description>&lt;i&gt;Unregistered Resolution is an ability to reuse container resolution logic for a given concrete type, without polluting the container itself with this type.&lt;/i&gt;&lt;br&gt;&lt;br&gt;Ahh, I see! Now that you've mentioned it, LinFu *does* support unregistered resolution, but its not implemented quite the same way as other contains would implement it. For example, if I had an unregistered class like:&lt;br&gt;&lt;br&gt;public class MyClass&lt;br&gt;{&lt;br&gt;     public MyClass(ISomeService service) &lt;br&gt;     {&lt;br&gt;         // ...&lt;br&gt;     }&lt;br&gt;}&lt;br&gt;&lt;br&gt;You can create the unregistered class in LinFu using the following code:&lt;br&gt;&lt;br&gt;// ...construct the container somewhere here&lt;br&gt;container.AddService&amp;lt;ISomeService&amp;gt;(new SomeService());&lt;br&gt;var myClass = (MyClass)container.AutoCreate(typeof(MyClass);&lt;br&gt;&lt;br&gt;Now the tricky part here is that I've been running LinFu through your battery of tests, and I can't seem to get it to pass the UnregisteredResolution test. Is there anyway to modify the logic so that each library has a way to implement their own unregistered resolution? Clumping it all under a single Adapter.Resolve() call doesn't seem to apply, in this case.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Philip Laureano</dc:creator><pubDate>Sun, 21 Sep 2008 04:42:03 -0000</pubDate></item><item><title>Re: Comparing .NET DI (IoC) Frameworks, Part 2</title><link>http://blog.ashmind.com/index.php/2008/09/08/comparing-net-di-ioc-frameworks-part-2/#comment-2452339</link><description>Unregistered Resolution is an ability to reuse container resolution logic for a given concrete type, without polluting the container itself with this type.&lt;br&gt;It is very useful when framework also provides support for additional arguments -- then I can easily build a factory that reuses container dependency resolution.&lt;br&gt;See &lt;a href="http://blog.ashmind.com/index.php/2008/06/23/di-framework-challenges-1-simple-factories/" rel="nofollow"&gt;http://blog.ashmind.com/index.php/2008/06/23/di...&lt;/a&gt; for an example.&lt;br&gt;&lt;br&gt;I think other solution is to create a quick throwable-out child container like autofac provides, but I have not tried this yet (sounds like a much less performant solution).&lt;br&gt;&lt;br&gt;I have added you as a project member to the net-ioc-frameworks, so you now probably have access to upload LinFu adapter.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">ashmind</dc:creator><pubDate>Sat, 20 Sep 2008 07:11:51 -0000</pubDate></item></channel></rss>