Hello:

Personally, I like the VariableFormatter class and plan on using it in
production. For me, this class is what is motivating me to push for a
2.2 release (3.0 seems like release inflation ;)

I agree that VariableFormatter appears complex, but that is OK to me
given the flexibility it provides. In addition, it works for some fancy
cases as demonstrated in the unit tests.

I recall vaguely being involved in the class' integration into [lang] so
I am happy to talk about it. 

If the original author, Oliver Heger, is here, please feel free to pipe
in. I found Oliver very flexible and easy to deal with in the past :)

> I just wonder if we should rewrite the class much more simply <snip>

If someone does this, I would humbly suggest that we refactor with
interfaces such that, at least for development, we can plugin the new
implementation and see if the same tests still pass.

WRT using StrBuilder, I like the idea of eating our own dog food but I
would only do so in this case if there is a real point in doing so. I
could be wrong ;)

Gary

> -----Original Message-----
> From: Stephen Colebourne [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, March 07, 2006 3:04 PM
> To: Jakarta Commons Developers List
> Subject: [lang] VariableFormatter and text package
> 
> This class is my main hold-up for release 2.2. Somehow, I just don't
> like it. It seems way complex for what it appears to do.
> 
> Thats a gut feel reaction however - I can't get my head around the
code
> easily (another negative).
> 
> More specifically, there is no way to substitute the variables in a
> StrBuilder, which is kindof the point of the package.
> 
> I just wonder if we should rewrite the class much more simply,
allowing
> it to operate on a StrBuilder. Isn't it just a loop through a map
doing
> a search and replace on ${key} -> value ?
> 
> Not sure how others feel about the class.
> 
> 
> The other item in the text package is StrBuilder.asTokenizer(). This
> method does not cuurrently actually link the tokenizer to the builder
> (as the writer/reader do). I think that what should happen is that the
> following sequence should work:
> 
> Create and populate StrBuilder
> Call asTokenizer()
> Tokenize
> Add text to the builder*
> Call StrTokenizer.reset()
> Tokenize (and get results including added text*)
> 
> Stephen
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to