architecture - Most controversial post, IoC, Ninject, just getting stuff to work -


Where do I start?

Runs in a design pattern during learning for the program, architectural options etc. For me, I understand conceptual D, IOC and why they are needed / good Modularity, low coupling high concentration - getting me is. For example, I'm building a small test website with the help of MVP pattern, where there is no solid view of the presenter, but it uses the interface which applies the interface. It is also a reference to a service level (which sits between the presenter and BLL), again, there is nothing concrete, using an interface for it. All good stuff

(manual) IOC is pushing concrete objects upwards, on the point that objects need to be injected, elsewhere. In other words, the dependency is still there, it is just above the IOC container and enter the disappointment.

I know that they are there, I know what is used for them. I opted to use the ninja. cold. So, I see I have a bunch of files in my downloads:

  • Lisa.text
  • Ninish file
  • Ninject.pdb
  • / Ul>

    OK ... What is a bunch of files to use? I do not know. Where do I keep them? Do I need all of them? Question Question ...

    Maybe read some manuals. Ninject wiki @ github correct I'll start reading - Why use Ninject? Dependence injection with hand, with dependency injection Ninject - a good example about swords and daggers, but I have not read anywhere how actually / use it Where do I place it in Visual Studio? How to call it?

    In addition to this, it presents me with this code:

      bind & lt; IWeapon & gt; (). & Lt; Sword & gt; ();   

    It says that every time IWeapon is called, the execution of the sword is given. Unnamed: Eh ... well, there was also a dagger - maybe I get a sword every time I do not have the IWeapon as the parameter in my producer, but how to do it? It does not say! Do I get stuck with the sword IWeapon? If not, then what is the code to change that time? And how?

    It says that when you have a bunch of controllers, it will take the most with only one parameter. What does this do with the constructor, what is the lesser parameter than the manufacturer? Can I do ninja with these constructors? Or ... how does this work? Again - it does not say anywhere, cursed!

    In the wiki, there is a link for SO on the most controversial post , it is about a boy named Joel who says a few things about IOC, which is a flame war / Enabled Nerdraj But you know what? I dare to say that I am a little root for this man. Why? Perhaps the concept of IOC is simple, but by God - to finally know how to use it, what to do in case of some situations. This is really really disappointing. Most of Google's turn turns into search, neither is anything useful, or really inbetween with very complex content to read. I know that the person can be correct in some sense - it can be difficult to understand the concepts and explain to someone who can not understand things that you understand easily.

    Why this can not be more like "Download files - eject this file and keep it somewhere easy, then go to Visual Studio, make a new map and refer to DLL. Use these steps "and then explain each step in a very good and detailed manner. No snippet of code. It's disappointing.

    Therefore, someone can think of what my question is. Okay, I want to use ning. what do I need? Where do I put it? How do I get it to work? Am I stuck with the sword everywhere IWapon? What am I doing while shining out of the sun?

    I have a very simple example when we present it to our developers in our project Code for Tender Preparation It only covers the original binding and thus does not work with this, how it works with relevant bindings like MVC or relevant topics. All this is done as a nUnit test, so I hope it is easy to follow. It does not show how it works properly in your project. I hope to project a real example MVC soon.

    Hope that helps.

Comments