commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertdon...@mac.com>
Subject Re: Isn't Rule really an Action?
Date Tue, 14 May 2002 17:09:32 GMT
hi ceki

digester has grown rather than been designed and poor naming is one of the 
consequences.

the concepts behind them are very clear (once you understand them) but as 
digester has grown, the word 'rule' has probably become rather over-used.

'Rules' implementations are really 'Rule' pattern matchers. they know how 
to return a set of rules that match a given pattern. this interface allows 
different pattern matchers with different rules about pattern matching to 
be plugged in. possible something like PatternMatcher might have been a 
better name.

i also think that you're probably right that renaming Rule into Action 
would reduce confusion and allow the documentation to talk about a rule as 
pattern plus an action.

unfortunately, these are all core classes and so renaming them would be a 
big step.

- robert

On Tuesday, May 14, 2002, at 12:58 PM, Ceki Gülcü wrote:

> Am I the only one that finds the disctinction between Rule, Rules and
> RuleSet confusing?
>
> Isn't a Rule really an Action? Wouldn't it be better to name Rule as
> Action such that a Rule becomes the association of a pattern and an
> Action? One would then write Digester.addRule(String pattern, Action
> action) instead of Digester.addRule(String pattern, Rule rule).
>
> Has this been suggested before? I have checked in the mailing lists
> and could not find any references. My apologies if this has been
> already debated. Regards.
>
>
> --
> Ceki
>
>
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.
> org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.
> org>
>


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


Mime
View raw message