Hi,

I'm curious why the developers of struts2 chose to define constants in an 
interface (StrutsStatics) and then implement that interface in at least 18 
classes (see 
http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/StrutsStatics.html).
 
The"interface constant" pattern has been out-of-favor since at least the 
publication of Joshua Bloch's landmark book, "Effective Java" in mid-2001 
(see item #17, pages 69-70).

This anti-pattern is repeated in the XWork code, too (example: 
http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/XWorkMessages.html),
 
and I'm wondering if it's systemic.

Can anyone comment on why this particular design decision was made?

Thank you.

*************************** IMPORTANT
NOTE***************************** The opinions expressed in this
message and/or any attachments are those of the author and not
necessarily those of Brown Brothers Harriman & Co., its
subsidiaries and affiliates ("BBH"). There is no guarantee that
this message is either private or confidential, and it may have
been altered by unauthorized sources without your or our knowledge.
Nothing in the message is capable or intended to create any legally
binding obligations on either party and it is not intended to
provide legal advice. BBH accepts no responsibility for loss or
damage from its use, including damage from virus.
************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to