avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@realityforge.org>
Subject Re: Context: usage recommendations? ( Re: [SUMMARY] Context )
Date Sun, 08 Dec 2002 01:51:48 GMT
On Sun, 8 Dec 2002 11:13, Adam Murdoch wrote:
> On Thu, 5 Dec 2002 09:38 pm, Peter Donald wrote:
> > On Thu, 5 Dec 2002 13:48, Adam Murdoch wrote:
> > > One problem is that it doesn't take long before you hit avalon's
> > > enormous scope.  It's difficult (impossible?) to come up with a useful
> > > set of mandatory services that will span this scope.  Even the
> > > canonical getHomeDir() example is a problem for lightweight containers
> > > with no such concept, or tightly sandboxed containers that don't (or
> > > can't) allow file system access.
> >
> > The one common one is getName().
>
> Do you think it would be useful for framwork to include a set of
> container-independent interfaces that cover some of the common ways that a
> component interacts with the container?

In a word no. Interfaces that define methods to get at data are just syntactic 
sugar. ie Whats the difference between

1. (String)context.get( "name.key" );
2. ((NameContext)context).getName();

and which would you prefer to use? (1) is easier to use (for both component 
and container writers) and is more lightly coupled. So why do we need (2) ?

If rather than data you are talking about services then I am not sure there is 
any set of common services. For a list of common keys for data see;

http://jakarta.apache.org/avalon/excalibur/info/context.html

though it is not completely up to date. This 

> Fair enough.  Can you expand on this?  How do you view MailetContext and
> ServletContext and EntityContext and friends in relation to Context and
> framework?

XContext == Logger + Context + ServiceManager + Configuration/Parameters

-- 
Cheers,

Peter Donald
------------------------------------------------
| We shall not cease from exploration, and the |
|  end of all our exploring will be to arrive  |
|  where we started and know the place for the |
|            first time -- T.S. Eliot          |
------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message