-----Mensagem original-----
De: Berin Loritsch [mailto:[EMAIL PROTECTED]
Check out the Directed Acyclic Graph utilities in Fortress (**.fortress.**.dag). Porting that to C# will help you find violations of the first guideline, as well as help you order your dependencies so that they are loaded and disposed of in the proper order.
Humm.. I'll do it tonight. But, before that, what is the meaning of
loading a dependent component?
It will be made available through look ups anyway, right? Maybe
dependencies handling are a Java issue, where the order of class loading
is a important issue. We won't have this kind of problem in .net. At
least while we don't support a kind a hot deployment.
Some of the very necessary features that containers do these days is to verify that the environment is sane. While we think we know all the components that are needed for a system, from time to time we may find that one is missing for some reason.
With the proper dependency information (i.e. one component requires another to function), the container can perform a sanity check as well as ensure that the components are initialized in an order where the required component will be available before the component that needs it is instantiated. That way there is no issue with component initialization.
Wouldn't you as a user prefer to see the container tell you that it is missing a component and what component it is missing rather than trying to guess?
So as an example, if I have a component that retrieves data from an expensive resource (like a database), I might have the component use a cache component. If the cache component exists, but has not been loaded and properly configured in time, then the data component will fail.
At least that is how we are using it on the Java side.
BTW, did you get the mail I sent you RE: getting proper info for your CVS access?
by using a LifestyleManager to centralize invocation of lifestyle methods.
Lifestyle is more like "transient", "singleton", "pooled", etc. Lifecycle is the initialization, destruction, etc.
I'll change its name tonight ;-)
:) Ok.
--
"They that give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety."
- Benjamin Franklin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
