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 (JIRA)" <ta...@jakarta.apache.org> on 2005/05/13 22:55:09 UTC

[jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Simplified insert binding template syntax
-----------------------------------------

         Key: TAPESTRY-331
         URL: http://issues.apache.org/jira/browse/TAPESTRY-331
     Project: Tapestry
        Type: New Feature
  Components: Framework  
    Versions: 4.0    
    Reporter: Howard M. Lewis Ship
    Priority: Minor
     Fix For: 4.0


It would be desirable to support a simplified syntax for obtaining data via bindings and inserting it.  A proposal has been to adopt ant-like syntax ("${...}") and interpret the expression within the braces as a binding reference.  This would eliminate the need for many Insert components, i.e.:


<h1>${thread.title}</h1>

rather than:

<h1><span jwcid="@Insert" value="thread.title"/></h1>

Or:

${message:prompt}

rather than:

<span key="prompt"/>


This kind of substitution is less invisible, but generally less intrusive, than creating a new component.

Further, the use of the Any component could be reduced via support for:

<img src="${imagePath}"/>

rather than:

<img jwcid="@Any" src="ognl:imagePath"/>


Some questions occur; are the following legal?

<${element}> ... </${element}>
<img jwcid="@Image" src="${asset:foo}"/>
<div ${attribute}="${value}"/>


A final note: these bindings should be treated as we treat informal parameters today; this includes automatically expanding IAssets into their corresponding URLs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Davor Hrg <hr...@gmail.com>.
If I could I'd definitely vote for any kind of shortcut for the @Insert 
component,
and end it with that.

>${ognl:something}
> have to expand it in :
><span jwcid="@Insert" value="ognl:something" class="ognl:dueClass"/>

All tha HTML code arround the expression makes it very hard to read, even 
with
the colored syntax. Why complicate our lives with the search od Utopia, here
is no way to stop people from making messy code :)

On 5/15/05, Vjeran Marcinko <vj...@tis.hr> wrote:
> 
> Since I'm quite loud about these things last couple of days, I would
> definetly give -1 on this if anyone is interested.
> I agree that "less is more", but "less" doesn't necessarily mean "less
> typing".
> 
> If everything starting going down this road, we can argue that :
> <span jwcid="@Conditional" condition="ognl:something">
> ....
> </span>
> could have convenience replacement as:
> $if{
> ....
> }
> ,maybe even :
> $if{
> }else{
> }
> Because Condition is such oftenly used component as well, and also
> cumbersome to use compared to some other web frameworks. See where this
> would be going?
> 
> I remember myself learning Tapestry, and that was exactly my first opinion
> about inserting text - how cumbersome!
> I have to type :
> <span jwcid="@Insert" value="ognl:something"/>
> instead of:
> $something (from my Velocity background)
> 
> BUT, when I continued to learn Tapestry further, I realized how consistent
> that was with usage of all other components, and it helped me to grasp
> component concept easier.
> If something is consistent with everything else in framework, then it 
> means
> LESS effort to grasp it in your mind. And that is LESS I'm talking about 
> in
> LESS IS MORE mantra!
> 
> As it is now, it is cleary visible where are components on the page : just
> Search File for JWCIDs, and ta-dah!
> And what happens when I want to add A SMALL change to component, eg. 
> "class"
> binding, to already existing :
> ${ognl:something}
> I have to expand it in :
> <span jwcid="@Insert" value="ognl:something" class="ognl:dueClass"/>
> It will certainly confuse some newbie that compares these 2 versions of
> HTML!
> 
> Change from :
> <span jwcid="@Insert" value="ognl:something"/>
> to
> <span jwcid="@Insert" value="ognl:something" class="ognl:dueClass"/>
> is much more understadable to anyone.
> 
> One more thing to think about. You all read around about Tapestry, and 
> what
> people are saying about it on the web...
> There are many praises, and nobody disputes it's power, but usual bad
> experiences are:
> - It's complex. I had to learn in detail it's request flow.
> - Where do I initialize things
> - no pretty URLs etc...
> I somehow never remembered anyone giving usage of Insert component as bad
> experience in Tapestry?!
> 
> Just my 2 cents.
> 
> -Vjeran
> 
> ----- Original Message -----
> From: "Robert Zeigler" <rd...@u.arizona.edu>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Sunday, May 15, 2005 5:14 AM
> Subject: Re: [jira] Created: (TAPESTRY-331) Simplified insert binding
> template syntax
> 
> 
> > Hm. My impression of howard's original suggestion was not that this was
> > another component declaration method. Rather, it was a more... direct
> > way of inserting text.
> > As it happens... you could conceivably then mimic various other
> > behavior, such as @Any, @Insert, etc. But that's a side-effect.
> > While I understand the "more is less" sentiment, sometimes the question
> > must be posed: what if what's there isn't right? Sure, @Insert and @Any
> > "Get the job done", but there are so many times where I find myself
> > putting in yet more markup, doing even more typing, just for some very
> > simple things. Tapestry goes a long way towards making difficult things
> > possible; why not go a little further in making simple things simple?
> > <h2><span jwcid="@Insert" value="message:title"/></h2>
> > Oh, and... since this template /is/ previewable... you end up having to
> > do something like this for wysiwyg preview:
> > <h2><span jwcid="@Insert" value="message:title">Title Text</span></h2>
> >
> > Frankly, to a designer, "Title Text" is just as meaningful(meaningless?)
> > as:
> > ${message:title}
> > only, they don't have to understand that "the span isn't really a
> > span... unless you put a class in there, then it really will be a 
> span..."
> > <h2>${message:title}</h2>
> >
> > Smaller, simpler, cleaner, lighter.
> > Do that... and deprecate <span key="message">Message</span>
> > Then you're back to two ways of doing things.
> >
> > For that matter, if all I need is a dynamically defined class on
> > something, why do:
> > <ol jwcid="@Any" class="ognl:dynamicClass">
> > ...
> > </ol>
> > why not just:
> > <ol class="${dynamicclass}">
> > ...
> > </ol>
> > I wholeheartedly disagree that this is messy, ugly, or unclean. In fact,
> > I think it's at least 2x cleaner. :) But... to each his own, I guess. =)
> >
> > Robert
> 
> 
> 
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10.5.2005
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
>

Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Nathan Kopp <nk...@mailshell.com>.
Vjeran Marcinko <vj...@tis.hr> wrote...

> BUT, when I continued to learn Tapestry further, I realized how consistent
> that was with usage of all other components, and it helped me to grasp
> component concept easier.
> If something is consistent with everything else in framework, then it
means
> LESS effort to grasp it in your mind. And that is LESS I'm talking about
in
> LESS IS MORE mantra!

This is a good point.  The "Insert" component does help a new user to grasp
the concept of a component.  If a scripting-style expression syntax were the
"norm" instead of the explicit "Insert" component, then that stepping-stone
for learning components is lost.

I think that someone using the ${} syntax would probably not view it to be a
full-fledged Tapestry component (even though it is under the hood).  They
probably would think of it as a text replacement.  Personally, I think this
is OK.  A good analogy might be the way Java uses the "+" operator to do
string concatenation... it's really just a shortcut for creating a
StringBuffer and calling append().  Sure, creating the StringBuffer and
calling the append() method is more consistent with the rest of the
language, but would you really want to give up that shortcut just for the
sake of consistency?  Also consider the new "for" syntax in Java 1.5.
That's just a shortcut for the messy iterator looping.  Shortcuts aren't
always bad.

> As it is now, it is cleary visible where are components on the page : just
> Search File for JWCIDs, and ta-dah!
> And what happens when I want to add A SMALL change to component, eg.
"class"
> binding, to already existing :
> ${ognl:something}
> I have to expand it in :
> <span jwcid="@Insert" value="ognl:something" class="ognl:dueClass"/>
> It will certainly confuse some newbie that compares these 2 versions of
> HTML!

For what it's worth, I think that most people who use the ${} syntax would
instead expand that to:
<span jwcid="@Any" class="ognl:dueClass"/>${ognl:something}</span>

I'm actually not sold on the idea of automatically creating "Any" components
if ${} is used in an attribute value.  I'm concerned that it could lead to a
breakdown in consistency and confusion about the syntax for attribute
values.  In fact, the current proposal for the "Insert" component shortcut
is probably not ideal, either.  Maybe there's a better alternative, but I do
think that a carefully designed shortcut would be popular among many of the
users (both existing and new).

-Nathan


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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Vjeran Marcinko <vj...@tis.hr>.
Since I'm quite loud about these things last couple of days, I would
definetly give -1 on this if anyone is interested.
I agree that "less is more", but "less" doesn't necessarily mean "less
typing".

If everything starting going down this road, we can argue that :
<span jwcid="@Conditional" condition="ognl:something">
....
</span>
could have convenience replacement as:
$if{
....
}
,maybe even :
$if{
}else{
}
Because Condition is such oftenly used component as well, and also
cumbersome to use compared to some other web frameworks. See where this
would be going?

I remember myself learning Tapestry, and that was exactly my first opinion
about inserting text - how cumbersome!
I have to type :
<span jwcid="@Insert" value="ognl:something"/>
instead of:
$something (from my Velocity background)

BUT, when I continued to learn Tapestry further, I realized how consistent
that was with usage of all other components, and it helped me to grasp
component concept easier.
If something is consistent with everything else in framework, then it means
LESS effort to grasp it in your mind. And that is LESS I'm talking about in
LESS IS MORE mantra!

As it is now, it is cleary visible where are components on the page : just
Search File for JWCIDs, and ta-dah!
And what happens when I want to add A SMALL change to component, eg. "class"
binding, to already existing :
${ognl:something}
I have to expand it in :
<span jwcid="@Insert" value="ognl:something" class="ognl:dueClass"/>
It will certainly confuse some newbie that compares these 2 versions of
HTML!

Change from :
<span jwcid="@Insert" value="ognl:something"/>
to
<span jwcid="@Insert" value="ognl:something" class="ognl:dueClass"/>
is much more understadable to anyone.

One more thing to think about. You all read around about Tapestry, and what
people are saying about it on the web...
There are many praises, and nobody disputes it's power, but usual bad
experiences are:
- It's complex. I had to learn in detail it's request flow.
- Where do I initialize things
- no pretty URLs  etc...
I somehow never remembered anyone giving usage of Insert component as bad
experience in Tapestry?!

Just my 2 cents.

-Vjeran

----- Original Message ----- 
From: "Robert Zeigler" <rd...@u.arizona.edu>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Sunday, May 15, 2005 5:14 AM
Subject: Re: [jira] Created: (TAPESTRY-331) Simplified insert binding
template syntax


> Hm. My impression of howard's original suggestion was not that this was
> another component declaration method. Rather, it was a more... direct
> way of inserting text.
> As it happens... you could conceivably then mimic various other
> behavior, such as @Any, @Insert, etc. But that's a side-effect.
> While I understand the "more is less" sentiment, sometimes the question
> must be posed: what if what's there isn't right? Sure, @Insert and @Any
> "Get the job done", but there are so many times where I find myself
> putting in yet more markup, doing even more typing, just for some very
> simple things. Tapestry goes a long way towards making difficult things
> possible; why not go a little further in making simple things simple?
> <h2><span jwcid="@Insert" value="message:title"/></h2>
> Oh, and... since this template /is/ previewable... you end up having to
> do something like this for wysiwyg preview:
> <h2><span jwcid="@Insert" value="message:title">Title Text</span></h2>
>
> Frankly, to a designer, "Title Text" is just as meaningful(meaningless?)
> as:
> ${message:title}
> only, they don't have to understand that "the span isn't really a
> span... unless you put a class in there, then it really will be a span..."
> <h2>${message:title}</h2>
>
> Smaller, simpler, cleaner, lighter.
> Do that... and deprecate <span key="message">Message</span>
> Then you're back to two ways of doing things.
>
> For that matter, if all I need is a dynamically defined class on
> something, why do:
> <ol jwcid="@Any" class="ognl:dynamicClass">
> ...
> </ol>
> why not just:
> <ol class="${dynamicclass}">
> ...
> </ol>
> I wholeheartedly disagree that this is messy, ugly, or unclean. In fact,
> I think it's at least 2x cleaner. :) But... to each his own, I guess. =)
>
> Robert



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 10.5.2005


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


RE: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Stephen Haberman <st...@chase3000.com>.
 
> -----Original Message-----
> From: Robert Zeigler [mailto:rdzeigle@u.arizona.edu] 
[snip]
> why not just:
> <ol class="${dynamicclass}">
> ...
> </ol>

Ooh, spiffy. That would nice. Just today I did an "@Any" just to get 1
dynamic attribute and sighed as I did so.

Ignoring the current status quo/"more is less"/there-can-only-be-one
argument (which is a fine, valid point) - if I were starting with a clean
slate, I'd really like that.

The Tapestry Lite evolution from explicit -> implicit would continue
to..."even more implicit" components. Er, just "hidden" @Inserts. I dunno,
just interesting to think about the move towards
less-configuration/less-overhead in Tapestry. I like it. Especially since
the heavy-configuration approach is still available if need be/for those who
like it. Impressive.

> But...to each his own, I guess. =)

Yep, unfortunately. Makes things interesting though. :-)

- Stephen



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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Robert Zeigler <rd...@u.arizona.edu>.
Hm. My impression of howard's original suggestion was not that this was
another component declaration method. Rather, it was a more... direct
way of inserting text.
As it happens... you could conceivably then mimic various other
behavior, such as @Any, @Insert, etc. But that's a side-effect.
While I understand the "more is less" sentiment, sometimes the question
must be posed: what if what's there isn't right? Sure, @Insert and @Any
"Get the job done", but there are so many times where I find myself
putting in yet more markup, doing even more typing, just for some very
simple things. Tapestry goes a long way towards making difficult things
possible; why not go a little further in making simple things simple?
<h2><span jwcid="@Insert" value="message:title"/></h2>
Oh, and... since this template /is/ previewable... you end up having to
do something like this for wysiwyg preview:
<h2><span jwcid="@Insert" value="message:title">Title Text</span></h2>

Frankly, to a designer, "Title Text" is just as meaningful(meaningless?)
as:
${message:title}
only, they don't have to understand that "the span isn't really a
span... unless you put a class in there, then it really will be a span..."
<h2>${message:title}</h2>

Smaller, simpler, cleaner, lighter.
Do that... and deprecate <span key="message">Message</span>
Then you're back to two ways of doing things.

For that matter, if all I need is a dynamically defined class on
something, why do:
<ol jwcid="@Any" class="ognl:dynamicClass">
...
</ol>
why not just:
<ol class="${dynamicclass}">
...
</ol>
I wholeheartedly disagree that this is messy, ugly, or unclean. In fact,
I think it's at least 2x cleaner. :) But... to each his own, I guess. =)

Robert

Richard Lewis-Shell wrote:
> I don't much like this idea (-1).  I agree that we don't need yet
> another way of declaring a component in a template, especially one that
> is completely different to the existing templating syntax.  What
> happened to "less is more"?  This feels like "more is less" to me :-(
> 
> Richard
> 
> Howard M. Lewis Ship (JIRA) wrote:
> 
>> Simplified insert binding template syntax
>> -----------------------------------------
>>
>>          Key: TAPESTRY-331
>>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>>      Project: Tapestry
>>         Type: New Feature
>>   Components: Framework      Versions: 4.0        Reporter: Howard M.
>> Lewis Ship
>>     Priority: Minor
>>      Fix For: 4.0
>>
>>
>> It would be desirable to support a simplified syntax for obtaining
>> data via bindings and inserting it.  A proposal has been to adopt
>> ant-like syntax ("${...}") and interpret the expression within the
>> braces as a binding reference.  This would eliminate the need for many
>> Insert components, i.e.:
>>
>>
>> <h1>${thread.title}</h1>
>>
>> rather than:
>>
>> <h1><span jwcid="@Insert" value="thread.title"/></h1>
>>
>> Or:
>>
>> ${message:prompt}
>>
>> rather than:
>>
>> <span key="prompt"/>
>>
>>
>> This kind of substitution is less invisible, but generally less
>> intrusive, than creating a new component.
>>
>> Further, the use of the Any component could be reduced via support for:
>>
>> <img src="${imagePath}"/>
>>
>> rather than:
>>
>> <img jwcid="@Any" src="ognl:imagePath"/>
>>
>>
>> Some questions occur; are the following legal?
>>
>> <${element}> ... </${element}>
>> <img jwcid="@Image" src="${asset:foo}"/>
>> <div ${attribute}="${value}"/>
>>
>>
>> A final note: these bindings should be treated as we treat informal
>> parameters today; this includes automatically expanding IAssets into
>> their corresponding URLs.
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 


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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Richard Lewis-Shell <rl...@mac.com>.
I don't much like this idea (-1).  I agree that we don't need yet 
another way of declaring a component in a template, especially one that 
is completely different to the existing templating syntax.  What 
happened to "less is more"?  This feels like "more is less" to me :-(

Richard

Howard M. Lewis Ship (JIRA) wrote:
> Simplified insert binding template syntax
> -----------------------------------------
> 
>          Key: TAPESTRY-331
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>      Project: Tapestry
>         Type: New Feature
>   Components: Framework  
>     Versions: 4.0    
>     Reporter: Howard M. Lewis Ship
>     Priority: Minor
>      Fix For: 4.0
> 
> 
> It would be desirable to support a simplified syntax for obtaining data via bindings and inserting it.  A proposal has been to adopt ant-like syntax ("${...}") and interpret the expression within the braces as a binding reference.  This would eliminate the need for many Insert components, i.e.:
> 
> 
> <h1>${thread.title}</h1>
> 
> rather than:
> 
> <h1><span jwcid="@Insert" value="thread.title"/></h1>
> 
> Or:
> 
> ${message:prompt}
> 
> rather than:
> 
> <span key="prompt"/>
> 
> 
> This kind of substitution is less invisible, but generally less intrusive, than creating a new component.
> 
> Further, the use of the Any component could be reduced via support for:
> 
> <img src="${imagePath}"/>
> 
> rather than:
> 
> <img jwcid="@Any" src="ognl:imagePath"/>
> 
> 
> Some questions occur; are the following legal?
> 
> <${element}> ... </${element}>
> <img jwcid="@Image" src="${asset:foo}"/>
> <div ${attribute}="${value}"/>
> 
> 
> A final note: these bindings should be treated as we treat informal parameters today; this includes automatically expanding IAssets into their corresponding URLs.
> 

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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Huge +1!!!  I'll reply in more detail when I can.

     Erik


On May 13, 2005, at 4:55 PM, Howard M. Lewis Ship (JIRA) wrote:

> Simplified insert binding template syntax
> -----------------------------------------
>
>          Key: TAPESTRY-331
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>      Project: Tapestry
>         Type: New Feature
>   Components: Framework
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Priority: Minor
>      Fix For: 4.0
>
>
> It would be desirable to support a simplified syntax for obtaining  
> data via bindings and inserting it.  A proposal has been to adopt  
> ant-like syntax ("${...}") and interpret the expression within the  
> braces as a binding reference.  This would eliminate the need for  
> many Insert components, i.e.:
>
>
> <h1>${thread.title}</h1>
>
> rather than:
>
> <h1><span jwcid="@Insert" value="thread.title"/></h1>
>
> Or:
>
> ${message:prompt}
>
> rather than:
>
> <span key="prompt"/>
>
>
> This kind of substitution is less invisible, but generally less  
> intrusive, than creating a new component.
>
> Further, the use of the Any component could be reduced via support  
> for:
>
> <img src="${imagePath}"/>
>
> rather than:
>
> <img jwcid="@Any" src="ognl:imagePath"/>
>
>
> Some questions occur; are the following legal?
>
> <${element}> ... </${element}>
> <img jwcid="@Image" src="${asset:foo}"/>
> <div ${attribute}="${value}"/>
>
>
> A final note: these bindings should be treated as we treat informal  
> parameters today; this includes automatically expanding IAssets  
> into their corresponding URLs.
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the  
> administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Jamie Orchard-Hays <ja...@dang.com>.
My first reaction to this is WHY???

It seems to me that this is a move to making Tapestry all things to all 
people. We already have two ways of inserting our bindings (implicit 
and explicit). Now a third, with a new syntax? I'm rather skeptical 
about this addition.

Jamie


On May 13, 2005, at 4:55 PM, Howard M. Lewis Ship (JIRA) wrote:

> Simplified insert binding template syntax
> -----------------------------------------
>
>          Key: TAPESTRY-331
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>      Project: Tapestry
>         Type: New Feature
>   Components: Framework
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Priority: Minor
>      Fix For: 4.0
>
>
> It would be desirable to support a simplified syntax for obtaining 
> data via bindings and inserting it.  A proposal has been to adopt 
> ant-like syntax ("${...}") and interpret the expression within the 
> braces as a binding reference.  This would eliminate the need for many 
> Insert components, i.e.:
>
>
> <h1>${thread.title}</h1>
>
> rather than:
>
> <h1><span jwcid="@Insert" value="thread.title"/></h1>
>
> Or:
>
> ${message:prompt}
>
> rather than:
>
> <span key="prompt"/>
>
>
> This kind of substitution is less invisible, but generally less 
> intrusive, than creating a new component.
>
> Further, the use of the Any component could be reduced via support for:
>
> <img src="${imagePath}"/>
>
> rather than:
>
> <img jwcid="@Any" src="ognl:imagePath"/>
>
>
> Some questions occur; are the following legal?
>
> <${element}> ... </${element}>
> <img jwcid="@Image" src="${asset:foo}"/>
> <div ${attribute}="${value}"/>
>
>
> A final note: these bindings should be treated as we treat informal 
> parameters today; this includes automatically expanding IAssets into 
> their corresponding URLs.
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On May 14, 2005, at 10:37 AM, Jamie Orchard-Hays wrote:

> Additionally, this will now allow completely invalid HTML  
> templates. <shudder>

For the record, <span jwcid="@Insert" value="ognl:whatever"/> is  
invalid XHTML as <span> does not have those attributes.  I believe  
XML namespaces need to be used to allow Tapestry to claim it's  
templates are "valid" and previewable completely by the standards.

And syntax like ${message:key} alleviates a lot of markup ugliness  
just to insert some text.  I'll surely reply more to this issue soon.

     Erik


>
>
> On May 13, 2005, at 4:55 PM, Howard M. Lewis Ship (JIRA) wrote:
>
>
>> Simplified insert binding template syntax
>> -----------------------------------------
>>
>>          Key: TAPESTRY-331
>>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>>      Project: Tapestry
>>         Type: New Feature
>>   Components: Framework
>>     Versions: 4.0
>>     Reporter: Howard M. Lewis Ship
>>     Priority: Minor
>>      Fix For: 4.0
>>
>>
>> It would be desirable to support a simplified syntax for obtaining  
>> data via bindings and inserting it.  A proposal has been to adopt  
>> ant-like syntax ("${...}") and interpret the expression within the  
>> braces as a binding reference.  This would eliminate the need for  
>> many Insert components, i.e.:
>>
>>
>> <h1>${thread.title}</h1>
>>
>> rather than:
>>
>> <h1><span jwcid="@Insert" value="thread.title"/></h1>
>>
>> Or:
>>
>> ${message:prompt}
>>
>> rather than:
>>
>> <span key="prompt"/>
>>
>>
>> This kind of substitution is less invisible, but generally less  
>> intrusive, than creating a new component.
>>
>> Further, the use of the Any component could be reduced via support  
>> for:
>>
>> <img src="${imagePath}"/>
>>
>> rather than:
>>
>> <img jwcid="@Any" src="ognl:imagePath"/>
>>
>>
>> Some questions occur; are the following legal?
>>
>> <${element}> ... </${element}>
>> <img jwcid="@Image" src="${asset:foo}"/>
>> <div ${attribute}="${value}"/>
>>
>>
>> A final note: these bindings should be treated as we treat  
>> informal parameters today; this includes automatically expanding  
>> IAssets into their corresponding URLs.
>>
>> -- 
>> This message is automatically generated by JIRA.
>> -
>> If you think it was sent incorrectly contact one of the  
>> administrators:
>>    http://issues.apache.org/jira/secure/Administrators.jspa
>> -
>> For more information on JIRA, see:
>>    http://www.atlassian.com/software/jira
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Nathan Kopp <nk...@mailshell.com>.
Jamie Orchard-Hays <ja...@dang.com> wrote..
> Additionally, this will now allow completely invalid HTML templates.
> <shudder>

Please explain.  How is the HTML any less valid with this syntax than
without it?

-Nathan


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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Paul Ferraro <pm...@columbia.edu>.
-1
Well said Jamie...
${ ... } reminds me too much of those dark <%= ... %> days.

Paul

Jamie Orchard-Hays wrote:

> It looks like MORE IS LESS to me. More ways of doing the same things 
> ends up with messy templates because a lot of coders will mix the 
> styles. I've already encountered this with mixing formal and informal 
> bindings and it's a real pain in the butt. Let's add a third way of 
> binding with a new syntax? I really don't like it.
>
> One thing that makes code readable and understandable is consistency. 
> This would introduce a different way of defining component bindings 
> that is inconsistent with the current styles. At least the formal and 
> informal are very similar. But these look like two different languages:
>
> <h1>${thread.title}</h1>
> <form jwcid="@Form>
> ...
> </form>
>
> I do not look forward to templates that look like:
>
> <h1>${thread.title}</h1>
> <form jwcid="@Form>
>     $message{label}<input jwcid="someInputField">
> </form> 
>
> It's ugly, it's inconsistent, and it's a mishmash of style. I'll say 
> it again: too many ways of doing the same thing leads to ugliness, 
> messiness, and also to confusion.
>
> -1 on this.
>
> Jamie
>
>
>
> On May 14, 2005, at 10:37 AM, Jamie Orchard-Hays wrote:
>
>> Additionally, this will now allow completely invalid HTML templates. 
>> <shudder>
>>
>>
>> On May 13, 2005, at 4:55 PM, Howard M. Lewis Ship (JIRA) wrote:
>>
>>> Simplified insert binding template syntax
>>> -----------------------------------------
>>>
>>>          Key: TAPESTRY-331
>>>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>>>      Project: Tapestry
>>>         Type: New Feature
>>>   Components: Framework
>>>     Versions: 4.0
>>>     Reporter: Howard M. Lewis Ship
>>>     Priority: Minor
>>>      Fix For: 4.0
>>>
>>>
>>> It would be desirable to support a simplified syntax for obtaining 
>>> data via bindings and inserting it.  A proposal has been to adopt 
>>> ant-like syntax ("${...}") and interpret the expression within the 
>>> braces as a binding reference.  This would eliminate the need for 
>>> many Insert components, i.e.:
>>>
>>>
>>> <h1>${thread.title}</h1>
>>>
>>> rather than:
>>>
>>> <h1><span jwcid="@Insert" value="thread.title"/></h1>
>>>
>>> Or:
>>>
>>> ${message:prompt}
>>>
>>> rather than:
>>>
>>> <span key="prompt"/>
>>>
>>>
>>> This kind of substitution is less invisible, but generally less 
>>> intrusive, than creating a new component.
>>>
>>> Further, the use of the Any component could be reduced via support for:
>>>
>>> <img src="${imagePath}"/>
>>>
>>> rather than:
>>>
>>> <img jwcid="@Any" src="ognl:imagePath"/>
>>>
>>>
>>> Some questions occur; are the following legal?
>>>
>>> <${element}> ... </${element}>
>>> <img jwcid="@Image" src="${asset:foo}"/>
>>> <div ${attribute}="${value}"/>
>>>
>>>
>>> A final note: these bindings should be treated as we treat informal 
>>> parameters today; this includes automatically expanding IAssets into 
>>> their corresponding URLs.
>>>
>>> -- 
>>> This message is automatically generated by JIRA.
>>> -
>>> If you think it was sent incorrectly contact one of the administrators:
>>>    http://issues.apache.org/jira/secure/Administrators.jspa
>>> -
>>> For more information on JIRA, see:
>>>    http://www.atlassian.com/software/jira
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Jamie Orchard-Hays <ja...@dang.com>.
It looks like MORE IS LESS to me. More ways of doing the same things 
ends up with messy templates because a lot of coders will mix the 
styles. I've already encountered this with mixing formal and informal 
bindings and it's a real pain in the butt. Let's add a third way of 
binding with a new syntax? I really don't like it.

One thing that makes code readable and understandable is consistency. 
This would introduce a different way of defining component bindings 
that is inconsistent with the current styles. At least the formal and 
informal are very similar. But these look like two different languages:

<h1>${thread.title}</h1>
<form jwcid="@Form>
...
</form>

I do not look forward to templates that look like:

<h1>${thread.title}</h1>
<form jwcid="@Form>
	$message{label}<input jwcid="someInputField">
</form>

It's ugly, it's inconsistent, and it's a mishmash of style. I'll say it 
again: too many ways of doing the same thing leads to ugliness, 
messiness, and also to confusion.

-1 on this.

Jamie



On May 14, 2005, at 10:37 AM, Jamie Orchard-Hays wrote:

> Additionally, this will now allow completely invalid HTML templates. 
> <shudder>
>
>
> On May 13, 2005, at 4:55 PM, Howard M. Lewis Ship (JIRA) wrote:
>
>> Simplified insert binding template syntax
>> -----------------------------------------
>>
>>          Key: TAPESTRY-331
>>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>>      Project: Tapestry
>>         Type: New Feature
>>   Components: Framework
>>     Versions: 4.0
>>     Reporter: Howard M. Lewis Ship
>>     Priority: Minor
>>      Fix For: 4.0
>>
>>
>> It would be desirable to support a simplified syntax for obtaining 
>> data via bindings and inserting it.  A proposal has been to adopt 
>> ant-like syntax ("${...}") and interpret the expression within the 
>> braces as a binding reference.  This would eliminate the need for 
>> many Insert components, i.e.:
>>
>>
>> <h1>${thread.title}</h1>
>>
>> rather than:
>>
>> <h1><span jwcid="@Insert" value="thread.title"/></h1>
>>
>> Or:
>>
>> ${message:prompt}
>>
>> rather than:
>>
>> <span key="prompt"/>
>>
>>
>> This kind of substitution is less invisible, but generally less 
>> intrusive, than creating a new component.
>>
>> Further, the use of the Any component could be reduced via support 
>> for:
>>
>> <img src="${imagePath}"/>
>>
>> rather than:
>>
>> <img jwcid="@Any" src="ognl:imagePath"/>
>>
>>
>> Some questions occur; are the following legal?
>>
>> <${element}> ... </${element}>
>> <img jwcid="@Image" src="${asset:foo}"/>
>> <div ${attribute}="${value}"/>
>>
>>
>> A final note: these bindings should be treated as we treat informal 
>> parameters today; this includes automatically expanding IAssets into 
>> their corresponding URLs.
>>
>> -- 
>> This message is automatically generated by JIRA.
>> -
>> If you think it was sent incorrectly contact one of the 
>> administrators:
>>    http://issues.apache.org/jira/secure/Administrators.jspa
>> -
>> For more information on JIRA, see:
>>    http://www.atlassian.com/software/jira
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


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


RE: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Stephen Haberman <st...@chase3000.com>.
 
> Additionally, this will now allow completely invalid HTML templates. 
> <shudder>

I can understand why purists like yourself really like completely valid HTML
templates. Absolutely no code in them, you can pass them off to non-tech
graphics designers, etc., etc. For people who like this, Tapestry is
awesome.

However, Tapestry is the only mainstream web framework (off the top of my
head) that allows this. Struts, Rails, WebWork, even JSP, etc., all require
some of non-HTML taglib/syntax in their pages.

I'm not seeing we should "down-grade" Tapestry's template approach, as I do
like it better, but from a purely pragmatic point of view, a lot of us don't
pass our HTML pages off to designers, and wouldn't mind having this shortcut
syntax.

I think this could be done like the previous Tapestry Lite. Old school
purists wanted to keep the explicit - which is completely fine, they have
their reasons, and the explicit way still works great. But the implicit
syntax sugar is also popular, and perhaps is becoming the norm.

Given this addition is also just syntax sugar, it could be done the same
way. If you don't like it, don't use it. But its a nice shortcut for the
rest of us.

Just my two cents. I'm actually on the fence - leaning towards the syntax
sugar, but not 100%.

- Stephen




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


Re: [jira] Created: (TAPESTRY-331) Simplified insert binding template syntax

Posted by Jamie Orchard-Hays <ja...@dang.com>.
Additionally, this will now allow completely invalid HTML templates. 
<shudder>


On May 13, 2005, at 4:55 PM, Howard M. Lewis Ship (JIRA) wrote:

> Simplified insert binding template syntax
> -----------------------------------------
>
>          Key: TAPESTRY-331
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>      Project: Tapestry
>         Type: New Feature
>   Components: Framework
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Priority: Minor
>      Fix For: 4.0
>
>
> It would be desirable to support a simplified syntax for obtaining 
> data via bindings and inserting it.  A proposal has been to adopt 
> ant-like syntax ("${...}") and interpret the expression within the 
> braces as a binding reference.  This would eliminate the need for many 
> Insert components, i.e.:
>
>
> <h1>${thread.title}</h1>
>
> rather than:
>
> <h1><span jwcid="@Insert" value="thread.title"/></h1>
>
> Or:
>
> ${message:prompt}
>
> rather than:
>
> <span key="prompt"/>
>
>
> This kind of substitution is less invisible, but generally less 
> intrusive, than creating a new component.
>
> Further, the use of the Any component could be reduced via support for:
>
> <img src="${imagePath}"/>
>
> rather than:
>
> <img jwcid="@Any" src="ognl:imagePath"/>
>
>
> Some questions occur; are the following legal?
>
> <${element}> ... </${element}>
> <img jwcid="@Image" src="${asset:foo}"/>
> <div ${attribute}="${value}"/>
>
>
> A final note: these bindings should be treated as we treat informal 
> parameters today; this includes automatically expanding IAssets into 
> their corresponding URLs.
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>    http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>    http://www.atlassian.com/software/jira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


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


[jira] Resolved: (TAPESTRY-331) Simplified insert binding template syntax

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-331?page=all ]
     
Howard M. Lewis Ship resolved TAPESTRY-331:
-------------------------------------------

    Fix Version: unspecified
                     (was: 4.0)
     Resolution: Won't Fix

This has proven to be another feature, like default binding prefixes,  not wanted by the majority of users.

> Simplified insert binding template syntax
> -----------------------------------------
>
>          Key: TAPESTRY-331
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>      Project: Tapestry
>         Type: New Feature
>   Components: Framework
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Priority: Minor
>      Fix For: unspecified

>
> It would be desirable to support a simplified syntax for obtaining data via bindings and inserting it.  A proposal has been to adopt ant-like syntax ("${...}") and interpret the expression within the braces as a binding reference.  This would eliminate the need for many Insert components, i.e.:
> <h1>${thread.title}</h1>
> rather than:
> <h1><span jwcid="@Insert" value="thread.title"/></h1>
> Or:
> ${message:prompt}
> rather than:
> <span key="prompt"/>
> This kind of substitution is less invisible, but generally less intrusive, than creating a new component.
> Further, the use of the Any component could be reduced via support for:
> <img src="${imagePath}"/>
> rather than:
> <img jwcid="@Any" src="ognl:imagePath"/>
> Some questions occur; are the following legal?
> <${element}> ... </${element}>
> <img jwcid="@Image" src="${asset:foo}"/>
> <div ${attribute}="${value}"/>
> A final note: these bindings should be treated as we treat informal parameters today; this includes automatically expanding IAssets into their corresponding URLs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Closed: (TAPESTRY-331) Simplified insert binding template syntax

Posted by "Brian K. Wallace (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-331?page=all ]
     
Brian K. Wallace closed TAPESTRY-331:
-------------------------------------


Never assigned. Marked WONTFIX by reporter (Howard)

> Simplified insert binding template syntax
> -----------------------------------------
>
>          Key: TAPESTRY-331
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>      Project: Tapestry
>         Type: New Feature

>   Components: Framework
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Priority: Minor
>      Fix For: unspecified

>
> It would be desirable to support a simplified syntax for obtaining data via bindings and inserting it.  A proposal has been to adopt ant-like syntax ("${...}") and interpret the expression within the braces as a binding reference.  This would eliminate the need for many Insert components, i.e.:
> <h1>${thread.title}</h1>
> rather than:
> <h1><span jwcid="@Insert" value="thread.title"/></h1>
> Or:
> ${message:prompt}
> rather than:
> <span key="prompt"/>
> This kind of substitution is less invisible, but generally less intrusive, than creating a new component.
> Further, the use of the Any component could be reduced via support for:
> <img src="${imagePath}"/>
> rather than:
> <img jwcid="@Any" src="ognl:imagePath"/>
> Some questions occur; are the following legal?
> <${element}> ... </${element}>
> <img jwcid="@Image" src="${asset:foo}"/>
> <div ${attribute}="${value}"/>
> A final note: these bindings should be treated as we treat informal parameters today; this includes automatically expanding IAssets into their corresponding URLs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Updated: (TAPESTRY-331) Simplified insert binding template syntax

Posted by "Brian K. Wallace (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-331?page=all ]

Brian K. Wallace updated TAPESTRY-331:
--------------------------------------

    Fix Version: 4.0.3
                     (was: unspecified)

> Simplified insert binding template syntax
> -----------------------------------------
>
>          Key: TAPESTRY-331
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-331
>      Project: Tapestry
>         Type: New Feature

>   Components: Framework
>     Versions: 4.0
>     Reporter: Howard M. Lewis Ship
>     Priority: Minor
>      Fix For: 4.0.3

>
> It would be desirable to support a simplified syntax for obtaining data via bindings and inserting it.  A proposal has been to adopt ant-like syntax ("${...}") and interpret the expression within the braces as a binding reference.  This would eliminate the need for many Insert components, i.e.:
> <h1>${thread.title}</h1>
> rather than:
> <h1><span jwcid="@Insert" value="thread.title"/></h1>
> Or:
> ${message:prompt}
> rather than:
> <span key="prompt"/>
> This kind of substitution is less invisible, but generally less intrusive, than creating a new component.
> Further, the use of the Any component could be reduced via support for:
> <img src="${imagePath}"/>
> rather than:
> <img jwcid="@Any" src="ognl:imagePath"/>
> Some questions occur; are the following legal?
> <${element}> ... </${element}>
> <img jwcid="@Image" src="${asset:foo}"/>
> <div ${attribute}="${value}"/>
> A final note: these bindings should be treated as we treat informal parameters today; this includes automatically expanding IAssets into their corresponding URLs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org