avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: ROLE & Lifecycles in C#
Date Tue, 29 Jul 2003 19:54:24 GMT
Yauheny Mikulski wrote:

> Hi, 
> 
> 
>>It makes the contract much more loose and the method >names turn into a mess. Right
now, if I see a method >named "configure" then I know where it fits in.
>>
> 
> I agree and suggest the following.
> We can implement both variants.
> Let people decide what way they should go.
> 
> Personally I got accustomed to the interface model
> cause I came to .NET from Java but others ...
> 
> I believe delegate and attribute model is very important as well and we shouldn't forget
it.
> There are pros and cons of every of them.
> and I think we might have a long discussion.

Let's not make it too long ;P

The interface model will work just fine--esp. for interfaces where
there is something to pass in.

The attribute model would be best for the meta info, and I believe we
have already identified a fairly rich set of tags we can include.

We might reduce the number of interfaces that we have though.  For
example, we could merge Startable and Initializable to just have
Initializable and Disposable.  I.e. we should simplify to the easiest
thing.

I'm running out of time for today, so I might be able to get that stuff
back in to CVS tomorrow.  Yauheny, I believe you can do those changes.

> 
> In regards to attribute model:
> 
> I don't like untyped manipulations with names like that:
> AvalonLifecycle("configurable")
> The mistake will appear at run-time only.
> That's very bad.
> 
> I think Berin's example to me was perfect:[AvalonInitialize]
> public void setUp() 
> {} 
> 
> [AvalonStart] 
> public void comenzar() 
> {}
> 
> Of course, we don't still avoid the problem of run-time exceptions due to using delegates
but this variant seems to be more correct.

That is the only type of exception that .NET has.

Anyway, with delegates, they would be used inside the container so they
may not have to be defined in the framework.

-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


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


Mime
View raw message