[dev] Cyclic dependencies in binders

Jan Schneider jan at horde.org
Fri May 14 21:39:22 UTC 2010


Zitat von Michael M Slusarz <slusarz at horde.org>:

> Quoting Jan Schneider <jan at horde.org>:
>
>> It does not *depend* on it, technically. And it would be easy to  
>> change the binders to not attach the alarm object to the  
>> notification, if Horde_Alarm wasn't available.
>> The point is that Horde_Alarm currently requires Horde_Notification  
>> to trigger loading alarms from the applications. Granted, we could  
>> probably trigger the alarm loading differently, and now that I  
>> think of it, this probably makes sense because it's much clearer.
>> That wouldn't solve the general problem though, that some other  
>> injected objects might have circular dependencies in the future.
>
> Is that last statement necessarily true?  Especially seeing that you  
> resolved your issue by simply refactoring the inheritance.  I'm  
> guessing that most cyclic issues can be resolved the same way - and  
> it may not be worth it to try to solve an issue that rarely/never  
> arises.

The issue hasn't been solved yet. :) I just worked around until I  
change the alarm triggering code to be called somewhere else. Probably  
in the registry ctor.
But I agree that it doesn't make much sense thinking too much about  
solutions for that we don't have a problem yet.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list