Re: Grails integration
Daniel Dekany <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <[email protected]> |
Sunday, January 9, 2011, 10:09:40 PM, Daniel Henrique Alves Lima wrote:
> Thanks, Daniel!
>
> I think i got it now: directive == method
> declaration/definition/implementation and tag == method call; or element
> vs. tag. I can't remember of doing this distinction when developing
> custom JSP Tag Libs, so i *think* this doesn't exist in GSP either. But
> it could be just a conceptual flaw in my understanding about GSP.
Most programmers seem to be confused when it comes to tags VS
elements... So people just used to say "JSP tag" when they mean a tag
handler (was that the term?), etc. Maybe even the JSP spec writers was
confused, who knows.
> How do you think i can rewrite this sentence to be correct and to be
> understandable by regular users?
>
> "This plugin exposes Grails Dynamic Tag Libraries as directives (or
> macros) and functions to FreeMarker template engine"
>
> Maybe something like
>
> "This plugin exposes Grails Dynamic Tag Libraries as libraries of
> directives and functions to FreeMarker template engine"
>
> ?
I guess almost nobody knows what's the difference between a directive,
a macro and a function, and what's the name of the ${...} things
anyway (interpolation BTW)... So how about just:
"With this plugin you can use the Grails Dynamic Tag
Libraries in FreeMarker templates. No JSP tag libraries
are involved at all, the plugin connects Grails and
FreeMarker as directly as possible.
> Using the docs about JSP as reference, the previous sentence seems
> correct.
>
> "(...) JSP tags are just FreeMarker directives, nothing special, so you
> use FreeMarker syntax for calling them, not JSP syntax: <@html.form
action="/query">>... (...)"
Certainly because that's just "JSP tag" for everyone... because for
example you have "JSP tag libraries", not "JSP tag handler libraries"
or something like that. So then we can say that "JSP tag" =
"FreeMarker directive" and maybe even "FreeMarker tag". Most certainly
GSP has adopted this terminology mess from JSP. The reason "Tags x
Directives" strike me as odd because FreeMarker do have both tags and
directives (with distinct meaning, like in XML etc.), so certainly it
should be "GSP Tags VS FreeMarker Directives" or even "VS FreeMarker
tags", because you are mostly just comparing the tag syntax there.
> http://freemarker.sourceforge.net/docs/pgui_misc_servlet.html
> http://freemarker.sourceforge.net/docs/dgui_misc_namespace.html
>
>
> Best regards,
>
> Daniel Lima.
>
>
> On Sun, 2011-01-09 at 20:38 +0100, Daniel Dekany wrote:
>
> (...)
>
>> No. The distinction between an FTL tag and an FTL directive is the
>> same as the distinction between a HTML tag and a HTML element (because
>> those are not the same either).
> (...)
--
Best regards,
Daniel Dekany
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web. Learn how to
best implement a security strategy that keeps consumers' information secure
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl