Jquery中文网 www.jquerycn.cn
Jquery中文网 >  脚本编程  >  java  >  正文 魅力四射的“小玩意”——PicoContainer

魅力四射的“小玩意”——PicoContainer

发布时间:2018-12-16   编辑:www.jquerycn.cn
jquery中文网为您提供魅力四射的“小玩意”——PicoContainer等资源,欢迎您收藏本站,我们将为您提供最新的魅力四射的“小玩意”——PicoContainer资源

Jon Tirsen在他的weblog里说,他看到一个叫PicoContainer的有趣项目,并立刻投身其中。这个自称“IoC(Inversion of Control)type 3”的微容器有什么吸引人的魅力?

PicoContainer / NanoContainer I''ve recently joined two new projects:
http://www.picocontainer.org</FONT>
http://www.nanocontainer.org</FONT>

The founders of the project are Paul (AltRMI, Enterprise Object Broker) and Aslak (XDoclet, MiddleGen). Actually they pair-programmed most of it at Paul''s place and a lot of beer was involved. The end result: a neat, simplistic and wonderfully TDDed piece of work. Joe (SiteMesh, QDox), my unit-testing guru, is also in on it.

It''s basically an Inversion-of-Control-container/framework/micro-kernel. Pico will be the simplistic micro-kernel and Nano will be a bunch of containers serving different purposes (most built on top of Pico).

I''m not an IoC-expert by any means, and, well, I didn''t know much about it before chatting with Paul and Aslak. The cool (and quite controversial) thing is that Pico (at least by default) implements style 3 IoC, which means constructors are used to define dependencies. Smart!

I will implement some Nanning support in Nano so that aspects can define dependencies on services and the container will resolve them properly, the aspects will also be able to aspectify the components transparently. The details are far from finalized, just a bunch of semi-digested ideas. I''ll give you a couple of use-cases though. An aspect implementing transparent persistence with Prevayler could retrieve it''s Prevayler-instance just by declaring it in its constructor: <pre>public class PrevaylerAspect { public PrevaylerAs

您可能感兴趣的文章:
魅力四射的“小玩意”——PicoContainer
photoshop设计森林透射光束效果后期制作教程
photoshop制作森林透射光束效果教程
玩转虚拟域名◎+
Golang的魅力
要成为Java高手需要注意的25个学习目标
CSS3制作动画效果例子
php memcache安装与注意事项
hash算法 consistent hashing 详解[图]
详细讲解PHP的日期时间函数date()

[关闭]