commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory" <ggreg...@seagullsoftware.com>
Subject RE: [lang] VariableFormatter - pre 2.2
Date Thu, 06 Jul 2006 21:26:51 GMT
Hello All:

> At a minimum, I'd like to see MapVariableResolver packge scoped.

Looking at the message thread:

http://www.mail-archive.com/commons-dev@jakarta.apache.org/msg78697.html

It seems that another proposal being discussed back in April was to make
some classes /easier/ to reuse and extend for the more advanced users by
making them come out of inner, which would also mean keeping them
public.

> However, I thnk I'd rather see VariableResolver changed to be a more
> general StrLookup class rather like StrMatcher. That way it could be
> used equally as well independent of VariableFormatter.

The challenge to me here is that I've heard some folks says they do not
want [lang] to become too framework-like. I am wondering if making
VariableResolver more generic would go in that direction. The nice thing
I see about the way it is now is that the solution is on making the
variable resolver pluggable and nothing more. Which is a draw back if
that interface is really /that great/.

FWIW, I am pretty happy with using the VariableFormatter class as is and
plan on doing so (as soon as my work schedule allows.)

Gary

> -----Original Message-----
> From: Stephen Colebourne [mailto:scolebourne@btopenworld.com]
> Sent: Wednesday, July 05, 2006 5:07 PM
> To: Jakarta Commons Developers List
> Subject: [lang] VariableFormatter - pre 2.2
> 
> Henri Yandell wrote:
> > Anyone know of any half-finished code in there at the moment?
> 
> I think I'm on record for saying that the VariableFormatter class
> doesn't quite fit as is IMHO. But I've not spelt out why, so here
goes...
> 
> At a minimum, I'd like to see MapVariableResolver packge scoped.
> 
> However, I thnk I'd rather see VariableResolver changed to be a more
> general StrLookup class rather like StrMatcher. That way it could be
> used equally as well independent of VariableFormatter.
> 
> public class StrLookup {
>    String lookup(String key);
> 
>    // package scoped implementation for Map
> }
> 
> You could envisage other (non [lang]) accessors such as OGNL, EL,
XPath
> or perhaps ones that accessed a List of strings by index.
> 
> The key point is that this shouldn't be limited to just
> VariableFormatter in the same way that StrMatcher isn't limited to
> StrTokenizer. Separation of Concerns.
> 
> Stephen
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


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


Mime
View raw message