This paper major studies on the design and implement of Muti-types IoC(MTIoC) containers, in order to reduce applications coupling between application components, MTIoC container can clearly reduced the coupling between components, Shorten the development of soft design, and will give developers a clear and concise solution. In container Objects no longer lookup their collaborators, on the contrary the container took the initiative in managing objects through dependency injection. Compared to existing IoC containers it can achieve more components registered types, components management are more flexible.The paper begins with the analyzing of the current problems faced by J2EE development, and development based on the benefits of IoC containers. Then it present the design of MTIoC container integrating the Java reflection mechanism, IoC design pattern, and briefly explained the various functional modules of MTIoC container and it's handling procedures and internal ideological; the detail design and implement of key parts in each module is also given including: container design, management of components, dependence analyses, cache management and optimization technology of MTIoC container. Then give MTIoC container function and performance test. At the last part of this paper is the conclusion of this design followed by future works. |