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]

  • No labels