中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档 | 网通镜像
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 编程语言 > Java > 综合文章
PicoContainer-One minute description
作者:佚名 时间:2006-09-16 08:51 出处:月光软件站 责编:月夜寒箫
              摘要:PicoContainer-One minute description

What is PicoContainer?
什么是微容器?

 

     

  • PicoContainer is a lightweight container.
    微容器是一个轻量级容器

     

  • It is not a replacement for a J2EE container, as it doesn't offer any infrastructure services out of the box.
    它不是J2EE容器的替代者,因此它不能脱离基础框架提供任何基础服务.(这里的box就我现在的理解为基础框架,如果有错误还请帮忙指点谢谢)

     

  • It can help you write better code.
    它可以帮助你写出更完善的代码.

 

What does PicoContainer do?
微容器可以做什么?

 

     

  • Dependency Injection. A way of instantiating components and lacing them together with other dependent components.
    依赖性注射模式.一种可以初始化组件并将与之相关的组件拼装到一起的方法.

     

  • PicoContainer is non-intrusive. Components don't have to implement any funny APIs. They can be POJOs.
    微容器是非插入式的.组件不需要实现任何特殊的API,它们完全可以是简单的java对象(POJOs).

     

  • Lifecycle support is built-in. Components' lifecycle can be managed easily by PicoContainer. (The default lifecycle is simple, but can be extended.)
    微容器整合了生命周期管理,可以方便的管理组件的生命周期.(默认的生命周期管理功能非常简单,但它是可以扩展的)

     

  • Very extensible design enabling virtually any form of extensions to the core.
    灵活的设计允许核心功能进行任何形式的扩展.

     

  • It is embeddable inside other applications. A 50k jar that has no external dependencies except JDK 1.3.
    他可以嵌入到其他应用服务的内部.除了JDK1.3外,他可以仅仅50K而不需要任何外部类库.

 

How do I use PicoContainer?
我如何使用微容器?

 

     

  • Components are implemented as ordinary Java classes and do typically not have to rely on any PicoContainer APIs.
    组件的实现完全可以是基本的java类并且不需要依靠任何微容器的API.

     

  • The components are assembled in the container using a simple Java API that is similar to a hash map.
    在微容器中,使用java的hash map来装配组件.

     

  • If lifecycle callbacks are required the simple lifecycle interfaces can be implemented. If you prefer to use your own lifecycle interfaces you can do that (but remember that third party components might rely on the default lifecycle).
    如果需要生命周期管理可以使用容器自带的接口来实现.如果你需要使用自己的生命周期管理也可以实现自己的接口(但是要注意的是第三方的组件也许依靠默认的生命周期管理方式).

 

Why should I use PicoContainer?
我为什么要使用微容器?

 

     

  • To modularize how dependencies between parts of your application are laced up. It is common having this scattered all over.
    模块化,使相关联的组件联系到一起.一般情况下他们会是分散在你的应用系统中的.

     

  • To improve the testability of your code.
    提高你的代码的可测试性.

     

  • To improve how components are configured in application.
    体好你的组件的可配置性.
关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有