velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Dekany <ddek...@freemail.hu>
Subject Re: What's the ideal syntax?
Date Sat, 08 Oct 2005 22:37:09 GMT
Saturday, October 8, 2005, 3:49:41 PM, Chad Meadows wrote:

> Hi Daniel,
>
> This is what I think might be favorable, at least for me.  The ${..} 
> syntax has become somewhat popular as script substituion in several 
> contexts such as JSTL, ANT, Jelly etc.  For that reason I actually would
> prefer all variables in the form ${foo} etc.  I like consistency.  So I
> want to look at some file and easily identify which parts are dynamic or
> part of the template script.  Therefore, out of the list of delimeters you
> mentioned.  I actually like #{template directive...} since it has a 
> resemblance to the variable substitution.

Maybe... just it resembles to a variable substitution a bit too much.
And where it really starts to look confusing is template languages where
there are multiple type of interpolations (like JSP 2.1 have ${...} and
#{...}). So on those cases I'm maybe rather on [#...]. Well, subjective
question enough anyway...

> It looks more consistent. I think this will feel much more natural to
> those who have been exposed to script in these other contexts. For
> those who have never seen any script, I believe it also has more of a
> visual distinction from xml/html elements as well.
>
> I as well am not sure if it can be greatly simplified beyond that and 
> maybe it does not need to be.  It is always the case that sometimes 
> flexibility comes with some complexity.  It is not necessarily that anyone
> I have shown FreeMarker actually discarded it as an option just because of
> the syntax.  The syntax is just an inhibitor when at first glance a need
> for any of the advanced functions of FreeMarker may not have been in the
> requirements.  When projects are pushed to the limit on schedules, 
> adopting what get's the job done with lowest learning curve is often the
> choice.

You don't have to learn all features of FreeMarker... they are waiting
there if you need them. And then you will like that they are there.
Otherwise I don't think writing simple templates is more complicated
than with Velocity. And actually, in the case where you learn the extra
features, you had to learn using a tool in Velocity... at least the
"extra features" are documented on a single place and are always
available.

> Thanks,
> Chad.


-- 
Best regards,
 Daniel Dekany


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


Mime
View raw message