Personally I prefer using something like;
StrutsConstants.STRUTS_URL........
I know it's not hip and funky, but it shows very clearly to anyone editing
the code where the constant is defined.
The Constant Interface Antipattern or static imports reduce the amount of
typing you have to do, but imho it reduces code clarity.
Al.
----- Original Message -----
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Developers List" <dev@struts.apache.org>
Sent: Wednesday, February 20, 2008 8:01 PM
Subject: Re: StrutsStatics...
--- Antonio Petrelli <[EMAIL PROTECTED]> wrote:
2008/2/20, Dave Newton <[EMAIL PROTECTED]>:
> ...why *do* we have StrutsStatics as an interface implemented all over?
IMHO all those "constants" should be scattered to all the needing
classes, not centralized.
In my past projects, I often had this sort of "statics", but I always
found a way to put them as private constants in appropriate classes
(even "utility" classes).
Well, these are all names under which objects are stored in contexts; they
may actually all belong together, but they definitely belong in a utility
class.
Just my 2 eurocents.
With the US economy the way it is that's probably like a nickel now.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]