tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HansD <co...@pobox.com>
Subject RE: [PATCH] Javadoc, Logging strings and some
Date Sun, 02 May 2004 18:10:36 GMT

The static strings were to make the log statements bit more readable in the various methods
(and with the refactor functionality of eclipse the work was not that hard).
But the presence of those statics in the java class was also not one of my favorites.
Refactoring to the sugested msg classes is perhaps a better idea.

I'm willing to help out with this..

So, per package a msg class (derived from a master class providing the basic functionality).
Should the properties file also be per package (with some of the more general strings moved
to a central location)?

Hans


>Subject: RE: [PATCH] Javadoc, Logging strings and some
>   From: "Howard M. Lewis Ship" <hlship@comcast.net>
>   Date: Sun, 2 May 2004 09:26:37 -0400
>     To: "'Tapestry development'" <tapestry-dev@jakarta.apache.org>
>
>I appreciate the effort you area putting into this, but I'm not really seeing the added
utility of
>all those static strings. For the most part, each of those strings is used just once (there's
only a
>handful of truly general messages). This ends up making Tapestry.java a chokepoint if
there are
>multiple developers.
>
>However, I did come up with an alternate idea.
>
>The problem with Tapestry.format() and friends is:
>- You have to know the message key
>- You have to know how all the arguments are used
>- You may have to convert or format some of the objects aguments
>- You may have to create an Object[] array if you have more than three arguments
>
>Now, what if there was a TapestryMessages class, and it had a static method for each message.
 It
>could take typed parameters and, in turn, invoke Tapestry.format().
>
>Better yet, what if each package inside Tapestry had its own Mesasges classes, such that
there isn't
>a chokepoint.
>
>This would make the Tapestry code that much more readable, i.e.
>
>throw new ApplicationRuntimeException(
>	ParserMessage.unexpectedDTD(publicId), getLocation());
>
>instead of:
>
>throw new ApplicationRuntimeException(
>	Tapestry.format("Parser.unexpectedDTD", publicId),
>      getLocation());
>
>--
>Howard M. Lewis Ship
>Independent J2EE / Open-Source Java Consultant
>Creator, Tapestry: Java Web Components 
>Creator, HiveMind
>http://howardlewisship.com
>
>
>> -----Original Message-----
>> From: HansD [mailto:cobra@pobox.com] 
>> Sent: Sunday, May 02, 2004 4:45 AM
>> To: tapestry-dev@jakarta.apache.org
>> Subject: [PATCH] Javadoc, Logging strings and some
>> 
>> 
>> Howard,
>> 
>> Since you've been updating the 3.1 code to the main trunk,
>> here's a new patch
>> 
>> Please let me know what I can do to improve the quality of 
>> the submitted patches.
>> 
>> Hans
>> 
>> 
<snip>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message