Picocontainer-One Minute Description

Source: Internet
Author: User
From: http://www.picocontainer.org/One+minute+description
One Minute Description
1 minute description
 

Authors: Paul hammant, asak hellesoy, Jon tirsen

What is picocontainer?
What is a micro container?
  • Picocontainer is a lightweight container.
    A micro container is a lightweight container.
  • It isNotA replacement for a J2EE container, as it doesn' t offer any infrastructure services out of the box.
    It is not a substitute for J2EE containers, so it cannot provide any basic services from the basic framework)
  • It can help you write better code.
    It helps you write better code.
What does picocontainer do?
What can a micro container do?
  • Dependency injection. A way of instantiating components and lacing them together with other dependent components.
    Dependency injection mode. A method that initializes a component and assembles it together.
  • Picocontainer is non-intrusive. Components don't have to implement any funny APIs. They can be pojos.
    Micro-containers are non-plug-in. components do not need to implement any special APIs. They can be simple Java objects (pojos ).
  • Lifecycle Support is built-in. Components 'lifecycle can be managed easily by picocontainer. (the default lifecycle is simple, but can be extended .)
    Microcontainers integrate lifecycle management to easily manage the lifecycle of components. (the default lifecycle management function is very simple, but it can be expanded)
  • Very extensible design enabling implements ally any form of extensions to the core.
    The flexible design allows the core functions to be expanded in any form.
  • It is embeddable inside other applications. A 50 K jar that has no external dependencies doesn't JDK 1.3.
    It can be embedded inside other application services. Except for jdk1.3, it can be only 50 K without any external class libraries.
How do I use picocontainer?
How do I use micro containers?
  • Components are implemented as ordinary Java classes and do typically not have to rely on any picocontainer APIs.
    The implementation of components can be a basic Java class without relying on any microcontainer API.
  • The components are assembled in the container using a simple Java API that is similar to a hash map.
    In a micro-container, Java hash map is used to assemble components.
  • 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 ).
    You can use the container interface to implement lifecycle management. if you need to use your own lifecycle management, you can also implement your own interfaces (but note that third-party components may rely on the default lifecycle management method ).
Why shoshould I use picocontainer?
Why should I use a micro container?
  • To modularize how dependencies between parts of your application are laced up. It is common having this scattered all over.
    Modular to link associated components. Generally, they are scattered in your application system.
  • To improve the testability of your code.
    Improve the testability of your code.
  • To improve how components are configured in application.
    Improve the configurability of your components.

Next: two minute tutorial
Next step: two-minute tutorial

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.