velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Dekany <>
Subject Re: comparing monetary value
Date Thu, 17 Oct 2002 16:01:32 GMT
Thursday, October 17, 2002, 11:16:39 AM, Martin Jacobson wrote:

> Jonathan Revusky wrote:
>> Excuse me. What evidence are you referring to?
> My own evidence, of course! :-)
> I enforce the separation between biz logic (servlet) & presentation (vm) 
> rigorously, and have come across no requirement for any arithmetic 
> features at all.

an later you are saying...

> Let's take the example you mentioned of calculating the lire equivalent
> of a Euro value: I agree that this is purely a presentation issue, but 
> why do I have to do this calculation server-side? Web developers already 
> use JavaScript for other purposes (eg, form data validation, fancy 
> roll-overs and the like), so why not use that?
> To illustrate:
> <html>
> <head>
>         <title>Testing embedded JavaScript</title>
>         <script language="JavaScript">
>                 function showLire(euros)
>                 {
>                         document.write(euros * 1936);
>                 }
>         </script>
> This puts the presentation logic in the presentation layer, where it
> belongs, using a presentation language that the designers already know, 

??? Earlier you said that you don't want arithmetic, because that
would weak separation between biz logic & presentation. But now you
are saying that the above task should be solved by the designers
(since it is a presentation layer thing), but they should use
JavaScript. So what??? In this case (JavaScript) you don't feel that
you break businessLogic-peresentation separation, but when a designer
solves exactly the same task with Velocity then you feel that? Does it
make sense?

And now I will not discuss the obvious disadvantage of relying on
client-side JavaScript. In general, the more task you can solve on the
server side, the more reliable your site is. (You know how stupid
browsers can be... and you can't even notice problems. If something
wrong on the server side, at least you have chance to notice that when
you look at the log file.)

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

View raw message