Re: Ideal tag syntax; what's your take on it?
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user,gmane.comp.web.freemarker.devel |
|---|---|
| Message-ID | <[email protected]> |
Thursday, June 9, 2011, 10:41:04 PM, Daniel Henrique Alves Lima wrote:
> Hi Daniel.
>
> I forgot to answer this thread...
>
> A little context:
> Well, I've worked with JSP (and prior template engines) for a
> while. A few years ago I started working at a company in which the
> "web masters, novice PHP programmers who wrote the presentation
> layer of our application JEE, were accustomed to using Velocity. At
> that time I already knew Velocity because I had written some tools
> for source code generation. Unfortunately, for some reason (?), I
> did not like to use Velocity to produce (X)HTML. After some Googling, I found FreeMarker.
>
> A cool feature (or side effect of syntax) of Velocity and
> FreeMarker was to write a vm. or. ftl template, rename it to .html
> and "see" the result in a browser, without using any kind of
> backend. That was very helpful when I was writing templates for HTML
> emails. Off course, it won't work for any case.
>
>
> One lesson I learned from Groovy (and also from FreeMarker): Make a
> terse syntax. Keep the template readable by humans. Even using code
> completion, I really hate to write <abc-def:xyz
> a="${q.getAbc().toString()}" b="true"> when I can write <xyz a=q.abc b=true>. I also hate XML
> One lesson I learned from somewhere else: Make things easy for the IDEs. Probably a contradiction
Agreed in these directions...
What's your take on the [.../] thing? I have seen you like to write
[#include "..." /] and like, that is, you like to put that "/" there
even if it's not strictly necessary. That also means that you know
what it would be like if it's required. How annoying is that for you?
I mean, would it be better if you don't have to enter any extra chars
if there's no nested content, instead you had to type two extra charts
when there is (two, because one in the start-tag, and another int the
end-tag).
Also, you have mentioned Velocity. Was its *syntax* better or worse?
First of all, the look and feel of it. Then, which features you hated
and which did you like (over FTL)? (Like, is the ability to write $foo
instead of ${foo} good or bad at the end?)
--
Best regards,
Daniel Dekany
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev