Code your own IOC Container

前端 未结 12 869
眼角桃花
眼角桃花 2020-12-08 00:52

Has anyone out there written their own IOC Container in C#? Or do the vast majority of folks use the various frameworks such as Spring. What are the pro\'s and con\'s of eac

12条回答
  •  时光说笑
    2020-12-08 01:18

    IOC container is not hard to write, it is just a well managed global recursive factory with some potential additional features. Using dictionary, reflection and delegate to register and build a simple container...

    The real question is why and how another new IOC container framework can bring benefits?

    In most of cases, you think you need more performance? non existing features? But most of time, existing frameworks is just what you need and enough, unless you have become aware of all the nonsense that the framework has forced you to do to use it.

    has the force of being disappointed by all the implementations of framework of ioc container of has features that are of the order of the antipattern, but also quirky and unreliable syntaxes and worse in ore of imposed couplings, I decided myself to experience it. This is why I made my own (very light) IOC container as open source.

    You can check it here : Puresharp API .net 4.5.2+

提交回复
热议问题