:) Basically, the same reason web applications and struts applications need a container. :)
Being able to instantiate objects using a XML driven factory is very, very convenient, and make programing strategies possible that would be otherwise impractical. Consider how difficult a Struts application would be to code if you had to create all the objects in the struts-config through calls to new. Possible, but, very messy and very verbose. Also, in practice, you often end up making some (or all) of your business objects singletons. Containers like Spring give you a quick and consistent way to create singletons, when you need them, and instant classes when you don't. -Ted. On Fri, 11 Mar 2005 15:38:01 +0100, Leon Rosenberg <[EMAIL PROTECTED]> wrote: > > Why do you need a container? Or why do I need a container? > > Leon > > On Fri, 2005-03-11 at 07:27 -0600, NetSQL wrote: > > I used Hivemind and switch to CoR, which I consider a light weight > > container. > > Good article on CoR at onJava.com. > > > > .V > > > > Manfred Wolff wrote: > > > > > > Ted. > > > > > > +1 to this approach. I prefer leightweight container such as hivemind to > > > manage the entrypoints to the business logic. Hivemind is easy to learn > > > and you have the benefit, that the lifecycle of the business components > > > may be steered too (such as pooled components, singletons etc.). Other > > > containers like spring or picocontainer are also well. > > > > > > -Manfred > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- HTH, Ted. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]