Differences between revisions 5 and 6
Revision 5 as of 2005-03-22 05:40:07
Size: 1872
Editor: anonymous
Comment: missing edit-log entry for this revision
Revision 6 as of 2009-09-20 23:16:41
Size: 1865
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
An Avalon container is a special kind of [wiki:WhatIsAComponent Component]. Just like any other An Avalon container is a special kind of [[WhatIsAComponent|Component]]. Just like any other
Line 14: Line 14:
To host components means enforcing, for these components, the ["Contracts"] To host components means enforcing, for these components, the [[Contracts]]
Line 16: Line 16:
their ["Lifestyle"] and ["Lifecycle"]. And this is not a simple responsability.... their [[Lifestyle]] and [[Lifecycle]]. And this is not a simple responsability....
Line 26: Line 26:
[http://avalon.apache.org/containers/ Containers] [[http://avalon.apache.org/containers/|Containers]]
Line 29: Line 29:
 * [wiki:ApacheAvalon:Fortress/SetUpSimpleContainer Set up a simple container using Fortress] ''(Fortress is meant to be a replacement for the old ExcaliburComponentManager)''
 * [wiki:Merlin/SetUpSimpleContainer|Set up a simple container using Merlin]
 * [[ApacheAvalon:Fortress/SetUpSimpleContainer|Set up a simple container using Fortress]] ''(Fortress is meant to be a replacement for the old ExcaliburComponentManager)''
 * [[Merlin:SetUpSimpleContainer|Set|up a simple container using Merlin]]

How to write an Avalon Container

You just made some components, and now you want to integrate the whole in an application ? The last effort you need to do do is to make an Avalon container.


What is an Avalon container ?


An Avalon container is a special kind of Component. Just like any other component, a container has a sole responsability. The container's responsability is to host some components.

To host components means enforcing, for these components, the Contracts defined by the Avalon framework . Part of those contracts is the handling of their Lifestyle and Lifecycle. And this is not a simple responsability....


What container to use ?


But don't worry, you will never implement all of a container by hand. The Avalon project provides some key base components to make the job easier for you. In fact several containers exist, and even outside the Avalon project. For a list of containers known to us see Containers

Here are some ways you can write a simple container :

In many big applications, you'll have lots of components to host. Often, you may also want to group your components in the way they will work together and be managed by their container. In those cases it will be necessary for you to implement something like containers of containers.

  • [Fortress/WriteSimpleContainerContainer|Set up a simple container of containers using Fortress]
  • [Merlin/HierarchicalContainers|Use the Merlin hierarchical containers capability]

AvalonContainerWriting (last edited 2009-09-20 23:16:41 by localhost)