You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship" <hl...@attbi.com> on 2003/02/23 22:41:10 UTC
[DISCUSS] Change to Template Bindings
Thought I'd summarize these thoughts about how the template is interpreted.
In alpha-3
"xxx" is a literal binding, equivalent to <static-binding>
"[[ xxx ]]" is an expression binding, equalivent to <binding>
Proposed / for debate:
"xxx" is a literal binding, equivalent to <static-binding>
"ognl:xxx" is an (OGNL) expression binding, equivalent to <binding>
"i18n:xxx" is an internationalized string key, equivalent to
<string-binding>
"param:xxx" is a reference to containing component parameter, equivalent to
<inherited-binding>
"foo:xxx" is also a literal binding (i.e., any unrecognized prefix)
Thoughts:
"ognl:" vs. "expr:". I think some day we may want to give users choice
about expression language. JXPath may someday be useful, for instance.
Explicitly mentioning OGNL is a way to not paint ourselves into a corner for
that.
"param:" and <inherited-binding> are much less useful of late. You can
pretty much count on a property foo (created via bytecode enhancement), so
it's easy to say <binding name="zap" expression="foo"/> instead of
<inherited-binding name="zap" parameter-name="foo"/>. Inherited bindings
are slightly more efficient.
Perhaps "string:" instead of the more cryptic "i18n:".
--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry
Re: [DISCUSS] Change to Template Bindings
Posted by Neil Clayton <ne...@cloudnine.net.nz>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sunday 23 Feb 2003 9:41 pm, Howard M. Lewis Ship wrote:
... cut ...
> Proposed / for debate:
>
> "xxx" is a literal binding, equivalent to <static-binding>
> "ognl:xxx" is an (OGNL) expression binding, equivalent to <binding>
> "i18n:xxx" is an internationalized string key, equivalent to
> <string-binding>
> "param:xxx" is a reference to containing component parameter, equivalent to
> <inherited-binding>
> "foo:xxx" is also a literal binding (i.e., any unrecognized prefix)
I'm all for this.
Actually, I don't mind so much about the i18n vs string discussion. Both are
clearer than [[ or {{. You could always use the full 'internationlization:'
:-) - ok, maybe not!
+1 (well, it would be if it were a vote ...)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+WnbwLXcfQF3yrNoRAh0CAKCzwq45oQSkH3NDt6qBHuRsfyPPJACgupI4
S7Tcr3GUGZ8SG2Rk6s3+uPE=
=U3Mb
-----END PGP SIGNATURE-----
Re: [DISCUSS] Change to Template Bindings
Posted by Christian Sell <ch...@netcologne.de>.
Howard M. Lewis Ship wrote:
> Thought I'd summarize these thoughts about how the template is interpreted.
>
> In alpha-3
>
> "xxx" is a literal binding, equivalent to <static-binding>
> "[[ xxx ]]" is an expression binding, equalivent to <binding>
>
> Proposed / for debate:
>
> "xxx" is a literal binding, equivalent to <static-binding>
> "ognl:xxx" is an (OGNL) expression binding, equivalent to <binding>
> "i18n:xxx" is an internationalized string key, equivalent to
> <string-binding>
> "param:xxx" is a reference to containing component parameter, equivalent to
> <inherited-binding>
> "foo:xxx" is also a literal binding (i.e., any unrecognized prefix)
>
>
> Thoughts:
>
> "ognl:" vs. "expr:". I think some day we may want to give users choice
> about expression language. JXPath may someday be useful, for instance.
> Explicitly mentioning OGNL is a way to not paint ourselves into a corner for
> that.
thats a good argument. There are so many expression languages out there
these days - JSTL (!), XPath, Jexl, OGNL, you name them.. I think OGNL
is the most powerful, though
>
> "param:" and <inherited-binding> are much less useful of late. You can
> pretty much count on a property foo (created via bytecode enhancement), so
> it's easy to say <binding name="zap" expression="foo"/> instead of
> <inherited-binding name="zap" parameter-name="foo"/>. Inherited bindings
> are slightly more efficient.
>
> Perhaps "string:" instead of the more cryptic "i18n:".
my vote may not count, but I still think "i18n" is in very broad use,
and it is *very* explicit..
>
>
> --
> Howard M. Lewis Ship
> Creator, Tapestry: Java Web Components
> http://jakarta.apache.org/proposals/tapestry
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
Re: [DISCUSS] Change to Template Bindings
Posted by Eric Everman <ev...@precedadesign.com>.
+1 Prefix (I think its clearer)
-1 i18n (Letters and #'s are difficult to type together, and the char's
"i!l1|" all look to similar)
I would prefer that prefixes be kept short - possibly 3 letters - since
they will often be hand typed. Also, I suggest a double colon syntax like
this:
exp::visit.something
which I think would visually stand out in a page more. The double colon
also avoids potential confusion with the syntax of namespaces and jsp tags.
Eric Everman.
At 2/23/2003, you wrote:
>Thought I'd summarize these thoughts about how the template is interpreted.
>
>In alpha-3
>
>"xxx" is a literal binding, equivalent to <static-binding>
>"[[ xxx ]]" is an expression binding, equalivent to <binding>
>
>Proposed / for debate:
>
>"xxx" is a literal binding, equivalent to <static-binding>
>"ognl:xxx" is an (OGNL) expression binding, equivalent to <binding>
>"i18n:xxx" is an internationalized string key, equivalent to
><string-binding>
>"param:xxx" is a reference to containing component parameter, equivalent to
><inherited-binding>
>"foo:xxx" is also a literal binding (i.e., any unrecognized prefix)
>
>
>Thoughts:
>
>"ognl:" vs. "expr:". I think some day we may want to give users choice
>about expression language. JXPath may someday be useful, for instance.
>Explicitly mentioning OGNL is a way to not paint ourselves into a corner for
>that.
>
>"param:" and <inherited-binding> are much less useful of late. You can
>pretty much count on a property foo (created via bytecode enhancement), so
>it's easy to say <binding name="zap" expression="foo"/> instead of
><inherited-binding name="zap" parameter-name="foo"/>. Inherited bindings
>are slightly more efficient.
>
>Perhaps "string:" instead of the more cryptic "i18n:".
>
>
>--
>Howard M. Lewis Ship
>Creator, Tapestry: Java Web Components
>http://jakarta.apache.org/proposals/tapestry
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org