velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson" <>
Subject RE: comparing monetary value
Date Tue, 15 Oct 2002 18:38:03 GMT
Jonathan wrote:
> So, instead of simply having:
> The price is: $price euros.
> The price is: $price euros. (${price*6.556 FFR)
> What you seem to be implying is 
> that the non-technical people who want to introduce this 
> change should have to talk to the programmers so that they expose the
> in the template. 
> For some reason, it is "bad" (TM) for them to write 6.556 
> literally in the  template.

I do not assume 'implied things' since that puts words in peoples

So, I will explicitly say that I personally would indeed expect a
non-technical designer to ask the Developer for this feature, rather
than hack it in directly because the template system made it possible.

"some reason": I can propose several reasons why this situation could be
bad in my opinion:
1) the conversion rate changes tomorrow to 5.998

2) each user has customized preferences for selecting her preferred
alternative currency (FFR, DM, USD, etc.)

3) the result of $price * $conversionRate will still need to have the
correct rounding and formatting for the resulting currency. (Ex. DM 6,03
or $6.03 USD - not $6.0029999987 DM)

Summary: my solution, using Velocity, would be to do this work in the
controller and give the template designer simply $price and


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message