RE: [picocontainer-dev] Swing MVC example app

"Michael Rimov" <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Organization Centerline Computers, Inc
Message-ID <0ad301c8a866$dda6dd10$98f49730$@com>
> I'm trying to make the make an example swing app that show Pico best
> practice.  I've forked a Sun MVC example code (
> http://java.sun.com/developer/technicalArticles/javase/mvc/
>   ) and replaced the main() method for one that uses PicoContainer,
> created two new components for JFrame and JDialog, plus made a couple
> of things Startable.

Paul,

This is a great example to have around!

One minor question that I had (style-wise): what would be the "standard" way of
constructing a new PicoContainer?

You have:
DefaultPicoContainer pico = new DefaultPicoContainer(new Caching().wrap(new
ConstructorInjection()));


While I noticed that I tend to use (since 2.0) for typical construction:
MutablePicoContainer pico = new
PicoBuilder().withCaching().withLifecycle().build();

Either is fine, but since Pico newbies will tend to set their behavior in stone
once they see the setup, I figured this would be a good chance to figure out a
"typical usage pattern".

	
-Mike (R)





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.