Actions should not be Identifiable ?

Rod Widdowson rdw at steadingsoftware.com
Sat Mar 22 06:13:38 EDT 2014


>>On the call today, I think you said Actions should not implement
>>Identifiable, meaning setId(). Is that correct ?> I'm definitely
questioning it at this point, yeah.
> 
> It strikes me as something you do for singletons, not prototypes. As a
> general rule of thumb anyway.

I would go further.  It is not #setId() which is important here, it's
#getId().  AFAICS the only need for the first is the second and if the
second isn't needed we should ditch it.  That would simplify a lot of stuff,
especially the tests.

I had a thought last night which re-raises a suggestion that Tom made 9
months past which we might want to factor in to the discussions.  If a major
use of #getId() is in logging (and as far as I can see it is always a
superset of the needs of a particular class), should we consider putting
#getLogPrefix() (plus supporting infrastructure) in there too?



More information about the dev mailing list