Small white beginner IOC, DI, Castle Windsor Dependency Injection, great God do not enter (discomfort)

Source: Internet
Author: User

After a few days, I came again. In the previous article, Bo friends mentioned that we should share the experience of our ABP beginners, and take some time to write today. At first, I was directly to see the Sun Ming Rui's blog, looked down, feel a lot of things have not touched, and then I went downGitHubUnder a few examples, it looks like a bit of a struggle, after all, I only used MVC3 and asp.net4.0 and EntityFramework3.5, suddenly feel like the world derailed, what the IOC just listen to the teacher mentioned, at that time do not know what use is not how to listen to,AutoMapper,AngularJS, LessI've never heard of anything. No way, had to first go to one of them to attack down, I first chose the IOC, it seems to be very strong appearance, on the valley powder search found the next information,IOCControlled inversion (inversion of control) is a design principle in object-oriented programming that can be used to reduce the degree of coupling between computer code, most commonlyDIDependency Injection (Dependency injection).Basic principles of Dependency InjectionIs that the application component should not be responsible for locating resources or other dependent collaboration objects. The work of the configuration object should be done byIOC Container is responsible for, "find resources" logic should be extracted from the code of the application component, to the IOC container responsible (that is, the object is stored in a container, need to use the time directly to the container to take out the use of it, The inside of the container is how to find this object without the user worrying about it. Here are the basics of controlling inversion and dependency injection, and don't repeat that, http://zhangjunhd.blog.51cto.com/113473/126530, deep understanding here, http://www.cnblogs.com/ Xingyukun/archive/2007/10/20/931331.html, and then we need to go back to ABP,ABP inside the container is Castle Windsor This article is supposed to be relatively clear Http://www.cnblogs.com/RicCC/archive/2010/03/30/castle-windsor-ioc-di.html, the ABP framework wraps it, and the code above the configuration file is implemented in C # code, So we don't need to go to configuration file write code configuration, we need to do is in each module (modules) Add this sentence: Iocmanager.registerassemblybyconvention (   Assembly.getexecutingassembly ()); From the following link to create a generated template project has been automatically added to the Www.aspnetboilerplate.com/Templates, and then you can use the Resolve function to obtain the desired object, here ABP inside the IOC said, I was still young, Capacity is limited, please indicate if there are errors. Let's talk about other technologies later.

Small white beginner IOC, DI, Castle Windsor Dependency Injection, great God do not enter (discomfort)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.