wood burning stoves 2.0*
The moose likes Other Application Frameworks and the fly likes Spring vs Pico container Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring vs Pico container" Watch "Spring vs Pico container" New topic
Author

Spring vs Pico container

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

How does Pico container compare with Spring ?


Groovy
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
PicoContainer is a component container, Spring is a component container and a lot more. Also, PicoContainer's implementation is somewhat trivial compared to Spring's.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Originally posted by Lasse Koskela:
PicoContainer is a component container, Spring is a component container and a lot more. Also, PicoContainer's implementation is somewhat trivial compared to Spring's.


Lasse, i understand that Spring is IOC + more. But any idea as to how the IOC part of the 2 containers compare? I mean are you saying that Pico does'nt support the different types of wiring Spring's BeanFacttory / Application context does? If yes, would it be possible for you to give an example?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Karthik Guru:
Lasse, i understand that Spring is IOC + more. But any idea as to how the IOC part of the 2 containers compare? I mean are you saying that Pico does'nt support the different types of wiring Spring's BeanFacttory / Application context does? If yes, would it be possible for you to give an example?

Here's two examples:
(disclaimer: this is coming from what I read in "Spring in Action")

1) PicoContainer only supports programmatic configuration. In other words, you'd have to write your own bootstrapping class to register bean implementations with the container.

2) PicoContainer only supports one bean per class. In other words, if you want to configure two javax.sql.DataSources to your two databases, you're out of luck.
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
thanks.
Rob Harrop
Author
Ranch Hand

Joined: Nov 03, 2004
Posts: 44
Pradeep,

The PicoContainer IoC capabilities are nowhere near as extensive as Springs. Spring is definitely the most complete and sophisticated IoC container on the Java market.

Rob
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8903

Thanks guys. I will get started with Spring soon.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Spring vs Pico container
 
Similar Threads
Coverage of the book
Questions about IOC and DI .
To Bruce Tate and Justin
To Authors: Dependency Injection Spring v/s others
Merits/Demerits of Spring over Picocontainer & like