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 Lewis Ship <hl...@gmail.com> on 2005/07/26 22:29:18 UTC

How to reach concensus w.r.t. default-binding?

Now, we don't want to make the same mistake as Sun did with Generics;
how do we reach concensus on wether to include or strip out
default-binding?  Another vote?

I tending towards leaving it as is, but there are some good ideas on
how to processed if we strip default-binding out.

For example, changing the various link components to take a "onclick"
parameter (as a rename of "listener"), i.e.

<a listener="listener:doClick">...</a>

vs.

<a onclick="listener:doClick"> ... </a>

The lack of repetition in the second example is desirable.

I'm also tending towards default of literal: in a template, default of
ognl: in XML.  But there's that consistency issue again; perhaps is
should be literal: everywhere for best efficiency?


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Mikaël Cluseau <nw...@nwrk.dyndns.org>.
Always though semantics are the way to go ;-) «onClick» is just a local
conflict and tapestry allows

<parameter name="on-click" property="onClick"/>

I remember that some people (about replacing jwcid by id) thought about
a «tap:» prefix, maybe it is a good start for a way to resolve this kind
of conflicts. Also quite consistent since we define an wonderful
extension to HTML :-)

Le mardi 26 juillet 2005 à 16:45 -0400, Geoff Longman a écrit :
> > <a onclick="listener:doClick"> ... </a>
> 
> hey, I like it! There must be a catch though.. how about people who
> pass onClick as an informal paramter? They'd lose there javascript
> bits.
> 
> Geoff
> 
> On 7/26/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> > Now, we don't want to make the same mistake as Sun did with Generics;
> > how do we reach concensus on wether to include or strip out
> > default-binding?  Another vote?
> > 
> > I tending towards leaving it as is, but there are some good ideas on
> > how to processed if we strip default-binding out.
> > 
> > For example, changing the various link components to take a "onclick"
> > parameter (as a rename of "listener"), i.e.
> > 
> > <a listener="listener:doClick">...</a>
> > 
> > vs.
> > 
> > <a onclick="listener:doClick"> ... </a>
> > 
> > The lack of repetition in the second example is desirable.
> > 
> > I'm also tending towards default of literal: in a template, default of
> > ognl: in XML.  But there's that consistency issue again; perhaps is
> > should be literal: everywhere for best efficiency?
> > 
> > 
> > --
> > Howard M. Lewis Ship
> > Independent J2EE / Open-Source Java Consultant
> > Creator, Jakarta Tapestry
> > Creator, Jakarta HiveMind
> > 
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> > 
> > ---------------------------------------------------------------------
> > 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: How to reach concensus w.r.t. default-binding?

Posted by Geoff Longman <gl...@gmail.com>.
> <a onclick="listener:doClick"> ... </a>

hey, I like it! There must be a catch though.. how about people who
pass onClick as an informal paramter? They'd lose there javascript
bits.

Geoff

On 7/26/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> Now, we don't want to make the same mistake as Sun did with Generics;
> how do we reach concensus on wether to include or strip out
> default-binding?  Another vote?
> 
> I tending towards leaving it as is, but there are some good ideas on
> how to processed if we strip default-binding out.
> 
> For example, changing the various link components to take a "onclick"
> parameter (as a rename of "listener"), i.e.
> 
> <a listener="listener:doClick">...</a>
> 
> vs.
> 
> <a onclick="listener:doClick"> ... </a>
> 
> The lack of repetition in the second example is desirable.
> 
> I'm also tending towards default of literal: in a template, default of
> ognl: in XML.  But there's that consistency issue again; perhaps is
> should be literal: everywhere for best efficiency?
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


-- 
The Spindle guy.           http://spindle.sf.net
Get help with Spindle:   
http://lists.sourceforge.net/mailman/listinfo/spindle-user
Announcement Feed:    
http://www.jroller.com/rss/glongman?catname=/Announcements
Feature Updates:            http://spindle.sf.net/updates

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


Re: How to reach concensus w.r.t. default-binding?

Posted by liigo <li...@hotpop.com>.
"default-binding-prefix" is a lovely thing, I like it.
it is very useful "somewhere", and maybe not "otherwhere",
why not we use it partly in the framework (when it do need)? such as <form
listener="doClick"> not <form listener="listener:doClick">
we don't need to remove it entirety.

IMO,
to keep "default-binding-prefix" partly exist,
we can add another parameter to all components, "use-default-binding",
which default to False.
and we can encourage the tapestry users not to use the
"default-binding-prefix", to avoid somethings.


liigo,
thanks



在 Wed, 27 Jul 2005 04:29:18 +0800,Howard Lewis Ship <hl...@gmail.com> 写
道:

> Now, we don't want to make the same mistake as Sun did with Generics;
> how do we reach concensus on wether to include or strip out
> default-binding?  Another vote?
>
> I tending towards leaving it as is, but there are some good ideas on
> how to processed if we strip default-binding out.
>
> For example, changing the various link components to take a "onclick"
> parameter (as a rename of "listener"), i.e.
>
> <a listener="listener:doClick">...</a>
>
> vs.
>
> <a onclick="listener:doClick"> ... </a>
>
> The lack of repetition in the second example is desirable.
>
> I'm also tending towards default of literal: in a template, default of
> ognl: in XML.  But there's that consistency issue again; perhaps is
> should be literal: everywhere for best efficiency?
>
>


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


Re: How to reach concensus w.r.t. default-binding?

Posted by Jamie Orchard-Hays <ja...@dang.com>.
+1


On Jul 26, 2005, at 5:42 PM, Harish Krishnaswamy wrote:

> I like it the way it is - defaults to literal in templates and ognl in
> specs. I am with Geoff on the rename - I think its going to be a pain
> during template development when you have an onclick just for testing
> out the template.
>
> -Harish
>
> On 7/26/05, Howard Lewis Ship <hl...@gmail.com> wrote:
>
>> Now, we don't want to make the same mistake as Sun did with Generics;
>> how do we reach concensus on wether to include or strip out
>> default-binding?  Another vote?
>>
>> I tending towards leaving it as is, but there are some good ideas on
>> how to processed if we strip default-binding out.
>>
>> For example, changing the various link components to take a "onclick"
>> parameter (as a rename of "listener"), i.e.
>>
>> <a listener="listener:doClick">...</a>
>>
>> vs.
>>
>> <a onclick="listener:doClick"> ... </a>
>>
>> The lack of repetition in the second example is desirable.
>>
>> I'm also tending towards default of literal: in a template,  
>> default of
>> ognl: in XML.  But there's that consistency issue again; perhaps is
>> should be literal: everywhere for best efficiency?
>>
>>
>> --
>> Howard M. Lewis Ship
>> Independent J2EE / Open-Source Java Consultant
>> Creator, Jakarta Tapestry
>> Creator, Jakarta HiveMind
>>
>> Professional Tapestry training, mentoring, support
>> and project work.  http://howardlewisship.com
>>
>> ---------------------------------------------------------------------
>> 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: How to reach concensus w.r.t. default-binding?

Posted by Harish Krishnaswamy <ha...@gmail.com>.
I like it the way it is - defaults to literal in templates and ognl in
specs. I am with Geoff on the rename - I think its going to be a pain
during template development when you have an onclick just for testing
out the template.

-Harish

On 7/26/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> Now, we don't want to make the same mistake as Sun did with Generics;
> how do we reach concensus on wether to include or strip out
> default-binding?  Another vote?
> 
> I tending towards leaving it as is, but there are some good ideas on
> how to processed if we strip default-binding out.
> 
> For example, changing the various link components to take a "onclick"
> parameter (as a rename of "listener"), i.e.
> 
> <a listener="listener:doClick">...</a>
> 
> vs.
> 
> <a onclick="listener:doClick"> ... </a>
> 
> The lack of repetition in the second example is desirable.
> 
> I'm also tending towards default of literal: in a template, default of
> ognl: in XML.  But there's that consistency issue again; perhaps is
> should be literal: everywhere for best efficiency?
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> 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: How to reach concensus w.r.t. default-binding?

Posted by Mikaël Cluseau <nw...@nwrk.dyndns.org>.
Le mardi 26 juillet 2005 à 23:42 -0400, Nathan Kopp a écrit :
> "Viktor Szathmary" <ph...@gmail.com> wrote...
> > If in doubt, go with a stricter and more consistent approach.. The
> > migration path from that to something with more "magic" is feasible,
> > but not the other way around. Making the "magic" go away will be more
> > painful on users.
> 
> Would people complain about the prefixes as much if they were shorter?  For
> example, in the JSP world nobody liked typing "bean:" in front of all the
> bean tags, but fewer people complain about "c:" prefix in the core JSTL
> tags.  Maybe single-character aliases for the prefixes would be a way to
> offset the annoyance of always having to specify the binding type.  Just a
> thought.

excellent if we can override the defaults in tapestry namespaces
(libraries and webapps).

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Nathan Kopp <nk...@mailshell.com>.
"Viktor Szathmary" <ph...@gmail.com> wrote...
> If in doubt, go with a stricter and more consistent approach.. The
> migration path from that to something with more "magic" is feasible,
> but not the other way around. Making the "magic" go away will be more
> painful on users.

Would people complain about the prefixes as much if they were shorter?  For
example, in the JSP world nobody liked typing "bean:" in front of all the
bean tags, but fewer people complain about "c:" prefix in the core JSTL
tags.  Maybe single-character aliases for the prefixes would be a way to
offset the annoyance of always having to specify the binding type.  Just a
thought.

-Nathan


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


Re: How to reach concensus w.r.t. default-binding?

Posted by Viktor Szathmary <ph...@gmail.com>.
If in doubt, go with a stricter and more consistent approach.. The
migration path from that to something with more "magic" is feasible,
but not the other way around. Making the "magic" go away will be more
painful on users.

Is this namespace-like idea pluggable? Who can decide where/what is an
appropriate default for a certain case? How is that choice made
obvious to users? I personally had no issues with the whole notion of
3.0 calling inherited methods, like "listeners.foo".. I thought that
was nice and consitent.. Now there are these special namespaces, and
I'm not even sure of the real value... :)

  viktor



On 7/26/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> Now, we don't want to make the same mistake as Sun did with Generics;
> how do we reach concensus on wether to include or strip out
> default-binding?  Another vote?
> 
> I tending towards leaving it as is, but there are some good ideas on
> how to processed if we strip default-binding out.
> 
> For example, changing the various link components to take a "onclick"
> parameter (as a rename of "listener"), i.e.
> 
> <a listener="listener:doClick">...</a>
> 
> vs.
> 
> <a onclick="listener:doClick"> ... </a>
> 
> The lack of repetition in the second example is desirable.
> 
> I'm also tending towards default of literal: in a template, default of
> ognl: in XML.  But there's that consistency issue again; perhaps is
> should be literal: everywhere for best efficiency?
> 
> 
> --
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
> 
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
> 
> ---------------------------------------------------------------------
> 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: How to reach concensus w.r.t. default-binding?

Posted by Kevin Menard <km...@servprise.com>.
On Jul 27, 2005, at 12:11 PM, Viktor Szathmary wrote:

> Templates are HTML, everything is by default simple text - expressions
> should stand out there. In spec files, you mostly put expressions,
> plain text should be the exception So this default seems to make sense
> :)

Perhaps my use cases are different, but I almost always use OGNL  
expressions for parameter values in the HTML spec.  Of course, I  
don't for attributes that have nothing to do with Tapestry, but does  
this really matter?  If attributes are being confused with component  
parameters, I don't see how one binding over the other is going to do  
you much good.

-- 
Kevin

Re: How to reach concensus w.r.t. default-binding?

Posted by Jamie Orchard-Hays <ja...@dang.com>.
I'm with you on this, Geoff. I don't want a bunch of different way to  
write the code. Then we enter the awful universe of Perlisms. Ugh.
On Jul 27, 2005, at 3:30 PM, Geoff Longman wrote:

>> This is why I suggested there be a Tapestry property that can be set
>> to override the default for the more advanced user.
>>
>
> Bad idea. I would hate to come in on a project after the original
> programmers have left and then always forget to check that the
> property was set to something or other.
>
> Geoff
>
> ---------------------------------------------------------------------
> 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: How to reach concensus w.r.t. default-binding?

Posted by Geoff Longman <gl...@gmail.com>.
> This is why I suggested there be a Tapestry property that can be set
> to override the default for the more advanced user.

Bad idea. I would hate to come in on a project after the original
programmers have left and then always forget to check that the
property was set to something or other.

Geoff

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Robert Zeigler <rd...@u.arizona.edu>.
Richard Lewis-Shell wrote:
> Sold!
> 
> This is the best argument so far (IMO).  Informal bindings HAVE to be
> literal in templates, which means only confusion if formal parameters in
> the template have ANY other default.
> 
> Making specification bindings use literal by default will just be
> painful to work with (too many "ognl:"s) - I believe that pain would
> outweigh any consistency gain.  I am comfortable with the idea that
> template component declarations are handled differently from
> specification component declarations (afterall they do look completely
> different).
> 
> Seems Tapestry 3 got it right :-)

But... tap 3 has no ambiguity in the specification because there's a
different element for each binding type.  There's no confusion because
you /can't/ confuse them.  In tp4, however, that's not the case.
Hence, personally, I'm still more comfortable with making things
"literal" across the board.
<binding name="foo" value="bar"/>
value should be the value, unless you state otherwise. In my opinion. :)
Still, I could live with the discrepancy. :)

Robert

> 
> I like Jamie's suggestion to add DTD support for different binding types
> - we need not lose the flexibility to add new binding types in the
> future do we?  The framework provides some standard ones (literal,
> message, listener etc), but we can leave the expression="abc: syntax for
> when someone wants to create a new prefix.  If that prefix makes sense
> to the framework as a whole, it can be added in later, and given DTD
> support.
> 
> Richard
> 
> Mind Bridge wrote:
> 
>> Hi,
>>
>> Just my 2c:
>>
>> At the very least, the informal parameters must always be 'literal' in
>> the templates to eliminate involuntary mistakes by the designers. This
>> is not at stake at the moment, but the leap is not that great from
>> there to formal parameters.
>>
>> Similar logic can be used for 'novice' users -- with default-binding
>> they will feel like they can only  code by example, as involuntary
>> mistakes would be much more likely. Not having default-binding would
>> make the code a bit longer, but at least you would need far less
>> knowledge to be productive (which is what Tapestry is about).
>>
>> In other words, a new developer could start working much faster,
>> rather than waste a lot of time to ponder what the templates mean.
>>
>> Someone said that shorter does not always mean clearer, and I think
>> that in this case he is particularly right.
>>
>>
>> An unrelated matter: I would suggest to replace 'literal' with 'text'
>> or sth short like that -- 'literal' is just too long, albeit verbally
>> accurate.
>>
>> -mb
>>
>>
>> ---------------------------------------------------------------------
>> 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: How to reach concensus w.r.t. default-binding?

Posted by Richard Lewis-Shell <rl...@mac.com>.
Sold!

This is the best argument so far (IMO).  Informal bindings HAVE to be 
literal in templates, which means only confusion if formal parameters in 
the template have ANY other default.

Making specification bindings use literal by default will just be 
painful to work with (too many "ognl:"s) - I believe that pain would 
outweigh any consistency gain.  I am comfortable with the idea that 
template component declarations are handled differently from 
specification component declarations (afterall they do look completely 
different).

Seems Tapestry 3 got it right :-)

I like Jamie's suggestion to add DTD support for different binding types 
- we need not lose the flexibility to add new binding types in the 
future do we?  The framework provides some standard ones (literal, 
message, listener etc), but we can leave the expression="abc: syntax for 
when someone wants to create a new prefix.  If that prefix makes sense 
to the framework as a whole, it can be added in later, and given DTD 
support.

Richard

Mind Bridge wrote:
> Hi,
> 
> Just my 2c:
> 
> At the very least, the informal parameters must always be 'literal' in 
> the templates to eliminate involuntary mistakes by the designers. This 
> is not at stake at the moment, but the leap is not that great from there 
> to formal parameters.
> 
> Similar logic can be used for 'novice' users -- with default-binding 
> they will feel like they can only  code by example, as involuntary 
> mistakes would be much more likely. Not having default-binding would 
> make the code a bit longer, but at least you would need far less 
> knowledge to be productive (which is what Tapestry is about).
> 
> In other words, a new developer could start working much faster, rather 
> than waste a lot of time to ponder what the templates mean.
> 
> Someone said that shorter does not always mean clearer, and I think that 
> in this case he is particularly right.
> 
> 
> An unrelated matter: I would suggest to replace 'literal' with 'text' or 
> sth short like that -- 'literal' is just too long, albeit verbally 
> accurate.
> 
> -mb
> 
> 
> ---------------------------------------------------------------------
> 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: How to reach concensus w.r.t. default-binding?

Posted by Norbert Sándor <de...@erinors.com>.
And not only newbies will have problems.
Even experienced developers (who try to join a large/complex tapestry 
project) would spend extra time for decrypting bindings.

Br,
Norbi

----- Original Message ----- 
From: "Mind Bridge" <mi...@yahoo.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Wednesday, July 27, 2005 9:52 PM
Subject: Re: How to reach concensus w.r.t. default-binding?


> Hi,
>
> Just my 2c:
>
> At the very least, the informal parameters must always be 'literal' in the 
> templates to eliminate involuntary mistakes by the designers. This is not 
> at stake at the moment, but the leap is not that great from there to 
> formal parameters.
>
> Similar logic can be used for 'novice' users -- with default-binding they 
> will feel like they can only  code by example, as involuntary mistakes 
> would be much more likely. Not having default-binding would make the code 
> a bit longer, but at least you would need far less knowledge to be 
> productive (which is what Tapestry is about).
>
> In other words, a new developer could start working much faster, rather 
> than waste a lot of time to ponder what the templates mean.
>
> Someone said that shorter does not always mean clearer, and I think that 
> in this case he is particularly right.
>
>
> An unrelated matter: I would suggest to replace 'literal' with 'text' or 
> sth short like that -- 'literal' is just too long, albeit verbally 
> accurate.
>
> -mb
>
>
> ---------------------------------------------------------------------
> 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: How to reach concensus w.r.t. default-binding?

Posted by Mind Bridge <mi...@yahoo.com>.
Hi,

Just my 2c:

At the very least, the informal parameters must always be 'literal' in 
the templates to eliminate involuntary mistakes by the designers. This 
is not at stake at the moment, but the leap is not that great from there 
to formal parameters.

Similar logic can be used for 'novice' users -- with default-binding 
they will feel like they can only  code by example, as involuntary 
mistakes would be much more likely. Not having default-binding would 
make the code a bit longer, but at least you would need far less 
knowledge to be productive (which is what Tapestry is about).

In other words, a new developer could start working much faster, rather 
than waste a lot of time to ponder what the templates mean.

Someone said that shorter does not always mean clearer, and I think that 
in this case he is particularly right.


An unrelated matter: I would suggest to replace 'literal' with 'text' or 
sth short like that -- 'literal' is just too long, albeit verbally accurate.

-mb


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


Re: How to reach concensus w.r.t. default-binding?

Posted by Kevin Menard <km...@servprise.com>.
On Jul 27, 2005, at 12:44 PM, Nick Westgate wrote:

> I see the consistency problem if ognl is the default for templates.
> (Adding jwcid shouldn't require changing prefixes for other  
> attributes.)
>
> But if literal is the default for specs, we'll have ognl: everywhere
> and a 'shallow' violation of DRY.

This is why I suggested there be a Tapestry property that can be set  
to override the default for the more advanced user.

> Templates and spec files are different.

To me, this is saying implicitly and explicitly declared components  
are different.  Now, of course the component is unaware of all of  
this, but if I need to give consideration to the context in which the  
component is declared when specifying parameter values, they are for  
all intents and purposes, different.  I typically start off  
implicitly declaring components, and as they get larger, I move them  
out to the spec file.  Say I have n components, each with m  
parameters, then when I move these components, I have n x m  
opportunities to screw up the translations, which are odds I don't  
very much care for.

It appears to me that default bindings across the board really take  
care of this issue . . .

-- 
Kevin

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Nick Westgate <ni...@jellyfish.co.nz>.
Viktor Szathmary <phraktle <at> gmail.com> writes:

> 
> On 7/27/05, Howard Lewis Ship <hlship <at> gmail.com> wrote:
> > I'm struggling with whether consistency is challenged by using
> > "literal:" as the default in templates, and "ognl:" as the default
> > elsewhere.
> 
> Templates are HTML, everything is by default simple text - expressions
> should stand out there. In spec files, you mostly put expressions,
> plain text should be the exception So this default seems to make sense
> :)
> 
>   viktor
> 

I see the consistency problem if ognl is the default for templates.
(Adding jwcid shouldn't require changing prefixes for other attributes.)

But if literal is the default for specs, we'll have ognl: everywhere
and a 'shallow' violation of DRY.

Templates and spec files are different.

Cheers,
Nick.



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


Re: How to reach concensus w.r.t. default-binding?

Posted by Viktor Szathmary <ph...@gmail.com>.
On 7/27/05, Howard Lewis Ship <hl...@gmail.com> wrote:
> I'm struggling with whether consistency is challenged by using
> "literal:" as the default in templates, and "ognl:" as the default
> elsewhere.

Templates are HTML, everything is by default simple text - expressions
should stand out there. In spec files, you mostly put expressions,
plain text should be the exception So this default seems to make sense
:)

  viktor

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Howard Lewis Ship <hl...@gmail.com>.
I played with some variations of these idea; but we still want a fixed
DTD if we ever want Spindle to work with 4.0 ... and it's very, very
useful to allow an extensible set of binding prefixes.  And for
consistency :-) we don't want to have more than one way of using a
foo: binding.

On 7/27/05, Jamie Orchard-Hays <ja...@dang.com> wrote:
> so what I mean is:
> 
> HTML
> <span jwcid="@Insert" value="ognl: someProperty"/>
> 
> and
> Page Spec
> <binding name="value" value="ongl:someProptery"/>
> 
> is my preference.
> 
> But as I wrote this, I thought, "why can't we have literal='' and
> expression='' and message='', etc in the Page spec?" Could this be
> parse easily? In otherwords, in the spec, the attribute name tells us
> what we're using, instead of the old <message-binding>, <binding>, etc.
> 
> Jamie
> 
> 
> On Jul 27, 2005, at 11:03 AM, Howard Lewis Ship wrote:
> 
> > I'm struggling with whether consistency is challenged by using
> > "literal:" as the default in templates, and "ognl:" as the default
> > elsewhere.
> >
> > On 7/27/05, Jamie Orchard-Hays <ja...@dang.com> wrote:
> >
> >> This is my main feeling about why I would prefer literal in HTML
> >> templates.
> >>
> >> If it comes down to a vote for all literal or all ognl in both
> >> templates and specs, then I'll go with all *literal*.
> >>
> >> Jamie
> >>
> >>
> >> On Jul 27, 2005, at 2:04 AM, Nick Westgate wrote:
> >>
> >>
> >>> Plain HTML tag attributes are literal, so why should the
> >>> component tag attributes in HTML be any different?
> >>>
> >>>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >>
> >>
> >>
> >
> >
> > --
> > Howard M. Lewis Ship
> > Independent J2EE / Open-Source Java Consultant
> > Creator, Jakarta Tapestry
> > Creator, Jakarta HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > 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
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Jamie Orchard-Hays <ja...@dang.com>.
so what I mean is:

HTML
<span jwcid="@Insert" value="ognl: someProperty"/>

and
Page Spec
<binding name="value" value="ongl:someProptery"/>

is my preference.

But as I wrote this, I thought, "why can't we have literal='' and  
expression='' and message='', etc in the Page spec?" Could this be  
parse easily? In otherwords, in the spec, the attribute name tells us  
what we're using, instead of the old <message-binding>, <binding>, etc.

Jamie


On Jul 27, 2005, at 11:03 AM, Howard Lewis Ship wrote:

> I'm struggling with whether consistency is challenged by using
> "literal:" as the default in templates, and "ognl:" as the default
> elsewhere.
>
> On 7/27/05, Jamie Orchard-Hays <ja...@dang.com> wrote:
>
>> This is my main feeling about why I would prefer literal in HTML
>> templates.
>>
>> If it comes down to a vote for all literal or all ognl in both
>> templates and specs, then I'll go with all *literal*.
>>
>> Jamie
>>
>>
>> On Jul 27, 2005, at 2:04 AM, Nick Westgate wrote:
>>
>>
>>> Plain HTML tag attributes are literal, so why should the
>>> component tag attributes in HTML be any different?
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>>
>>
>
>
> -- 
> Howard M. Lewis Ship
> Independent J2EE / Open-Source Java Consultant
> Creator, Jakarta Tapestry
> Creator, Jakarta HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> 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: How to reach concensus w.r.t. default-binding?

Posted by Howard Lewis Ship <hl...@gmail.com>.
I'm struggling with whether consistency is challenged by using
"literal:" as the default in templates, and "ognl:" as the default
elsewhere.

On 7/27/05, Jamie Orchard-Hays <ja...@dang.com> wrote:
> This is my main feeling about why I would prefer literal in HTML
> templates.
> 
> If it comes down to a vote for all literal or all ognl in both
> templates and specs, then I'll go with all *literal*.
> 
> Jamie
> 
> 
> On Jul 27, 2005, at 2:04 AM, Nick Westgate wrote:
> 
> > Plain HTML tag attributes are literal, so why should the
> > component tag attributes in HTML be any different?
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Jamie Orchard-Hays <ja...@dang.com>.
This is my main feeling about why I would prefer literal in HTML  
templates.

If it comes down to a vote for all literal or all ognl in both  
templates and specs, then I'll go with all *literal*.

Jamie


On Jul 27, 2005, at 2:04 AM, Nick Westgate wrote:

> Plain HTML tag attributes are literal, so why should the
> component tag attributes in HTML be any different?
>


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


Re: How to reach concensus w.r.t. default-binding?

Posted by Nick Westgate <ni...@key-planning.co.jp>.
I'd go even further: all literal or ognl makes no sense, especially
all ognl. Plain HTML tag attributes are literal, so why should the
component tag attributes in HTML be any different?

On a more pragmatic note, if we add or remove the jwcid="...", then
we have to modify attribute values. No thanks! In the context of
HTML templates, literal is the natural default.

Similarly if we look at .page files the most common binding is ognl.
Prefixing ognl everywhere would be redundant and distracting. Tapestry
version 3 had it right: ognl is the natural default for spec files.

Cheers,
Nick.


Jamie Orchard-Hays wrote:
> I must say I don't understand the desire to have a it all literal or  
> all ognl between specs and templates. I have thought ognl in specs  and 
> literal in templates made absolutely perfect sense in 3.
> 
> Jamie

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Robert Zeigler <rd...@u.arizona.edu>.
There's an additional point here...
in 3.x, each binding-type in the component spec had it's own xml tag...
<static-binding name="" value=""/>
vs.
<inherited-binding .../>
vs.
<binding name="xyz" expression=""/>
                    ^^^^^^^^^^
Thus, in the 3.x world, it was explicit in the component spec
that string specified in binding was an expression... b/c it's
expression=""; So, no confusion.
in 4.0, however, there is only a /single/ binding element defined,
and the type of binding is determined by the prefix.  So, my vote is
with Kevin; the default prefix between templates and component/page
specs should be the same.  Whether it defaults to literal or ognl I
don't really care, although here I'm inclined to agree with whomever it
was that noted that (lazy) people (which is most of us, really. ;) would
be inclined to use ognl strings instead of the literal binding, for the
sake of brevity.
On the other hand... an ognl expression, or some other binding-type
(like listener, bean, etc.) is probably going to be used for bindings
far more often than a literal binding.
Anyway... sorry if I rambled a bit... been a long day. :)

Robert

Kevin Menard wrote:
> Jamie Orchard-Hays wrote:
> 
>>I must say I don't understand the desire to have a it all literal or 
>>all ognl between specs and templates. I have thought ognl in specs  and
>>literal in templates made absolutely perfect sense in 3.
> 
> 
> Sure, once you understand it, it's easy to remember.  As a newbie, I was
> burned several times by this lack of consistency.  What it boils down to
> is that components defined in the HTML and in the spec are either
> equivalent or they're not.  If they're equivalent, they should have the
> same semantics.  I shouldn't have to worry about changing all my
> bindings when going from one to the other.
> 
> It seems the two different defaults is a convenience thing more than
> anything else.  On top of this, it's not even convenient for everyone,
> just those that fit this "common" usage pattern of where they choose to
> define their components.  I'd rather have the consistency, which makes
> perfect sense to me.
> 


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


Re: How to reach concensus w.r.t. default-binding?

Posted by Kevin Menard <km...@servprise.com>.
Jamie Orchard-Hays wrote:
> I must say I don't understand the desire to have a it all literal or 
> all ognl between specs and templates. I have thought ognl in specs  and
> literal in templates made absolutely perfect sense in 3.

Sure, once you understand it, it's easy to remember.  As a newbie, I was
burned several times by this lack of consistency.  What it boils down to
is that components defined in the HTML and in the spec are either
equivalent or they're not.  If they're equivalent, they should have the
same semantics.  I shouldn't have to worry about changing all my
bindings when going from one to the other.

It seems the two different defaults is a convenience thing more than
anything else.  On top of this, it's not even convenient for everyone,
just those that fit this "common" usage pattern of where they choose to
define their components.  I'd rather have the consistency, which makes
perfect sense to me.

-- 
Kevin

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Jamie Orchard-Hays <ja...@dang.com>.
I must say I don't understand the desire to have a it all literal or  
all ognl between specs and templates. I have thought ognl in specs  
and literal in templates made absolutely perfect sense in 3.

Jamie



On Jul 26, 2005, at 5:59 PM, Paul Ferraro wrote:

> Howard Lewis Ship wrote:
>
>
>> Now, we don't want to make the same mistake as Sun did with Generics;
>> how do we reach concensus on wether to include or strip out
>> default-binding?  Another vote?
>>
>> I tending towards leaving it as is, but there are some good ideas on
>> how to processed if we strip default-binding out.
>>
>> For example, changing the various link components to take a "onclick"
>> parameter (as a rename of "listener"), i.e.
>>
>> <a listener="listener:doClick">...</a>
>>
>>
> The fact that the chosen binding prefix and the component's  
> parameter name happen to be the same in this example does not  
> bother me.  To call them redundant seems superficial.
>
>
>> vs.
>>
>> <a onclick="listener:doClick"> ... </a>
>>
>>
>>
> Makes no difference to me ... except that "onclick" is a common  
> HTML attribute often used as an informal parameter for javascript  
> actions (e.g. confirmation windows).  You'll have to pick a  
> different name.
>
>
>> The lack of repetition in the second example is desirable.
>>
>> I'm also tending towards default of literal: in a template,  
>> default of
>> ognl: in XML.  But there's that consistency issue again; perhaps is
>> should be literal: everywhere for best efficiency?
>>
>>
> I prefer to have "literal:" be the universal default.
> If the default binding prefix is "ognl:" then I think users will be  
> more inclined to use ognl to define literal expressions (as in 3.0)  
> rather than use the more efficient literal binding.
> e.g.
> <property name="message" value="'This is my message'"/>
>
> ... may be more attractive (since it requires less typing), but is  
> less efficient than ...
>
> <property name="message" value="literal:This is my message"/>
>
>
> I think the best strategy is to choose the most consistent approach  
> as the default (i.e. literal everywhere) and allow users to  
> override it to their hearts' content.
>
> Paul
>
> ---------------------------------------------------------------------
> 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: How to reach concensus w.r.t. default-binding?

Posted by Paul Ferraro <pa...@gmail.com>.
Howard Lewis Ship wrote:

>Now, we don't want to make the same mistake as Sun did with Generics;
>how do we reach concensus on wether to include or strip out
>default-binding?  Another vote?
>
>I tending towards leaving it as is, but there are some good ideas on
>how to processed if we strip default-binding out.
>
>For example, changing the various link components to take a "onclick"
>parameter (as a rename of "listener"), i.e.
>
><a listener="listener:doClick">...</a>
>  
>
The fact that the chosen binding prefix and the component's parameter 
name happen to be the same in this example does not bother me.  To call 
them redundant seems superficial.

>vs.
>
><a onclick="listener:doClick"> ... </a>
>
>  
>
Makes no difference to me ... except that "onclick" is a common HTML 
attribute often used as an informal parameter for javascript actions 
(e.g. confirmation windows).  You'll have to pick a different name.

>The lack of repetition in the second example is desirable.
>
>I'm also tending towards default of literal: in a template, default of
>ognl: in XML.  But there's that consistency issue again; perhaps is
>should be literal: everywhere for best efficiency?
>  
>
I prefer to have "literal:" be the universal default. 

If the default binding prefix is "ognl:" then I think users will be more 
inclined to use ognl to define literal expressions (as in 3.0) rather 
than use the more efficient literal binding.
e.g.
<property name="message" value="'This is my message'"/>

... may be more attractive (since it requires less typing), but is less 
efficient than ...

<property name="message" value="literal:This is my message"/>


I think the best strategy is to choose the most consistent approach as 
the default (i.e. literal everywhere) and allow users to override it to 
their hearts' content.

Paul

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


Re: How to reach concensus w.r.t. default-binding?

Posted by Pablo Lalloni <pl...@afip.gov.ar>.
El Mar 26 Jul 2005 17:29, Howard Lewis Ship escribió:
> <a listener="listener:doClick">...</a>
>
> vs.
>
> <a onclick="listener:doClick"> ... </a>

The second one makes a better idiom for components receiving more than one 
IActionListener parameter and maintaining coherence with link components that 
receive only one.

i.e.:

<span jwcid="@Wizard" onFinish="listener:wizardFinish" 
onCancel="listener:wizardCancel"/>

What bothers me here is the camel case in parameter names... all lowercase as 
"onclick" ain't better ;)

> I'm also tending towards default of literal: in a template, default of
> ognl: in XML.  But there's that consistency issue again; perhaps is
> should be literal: everywhere for best efficiency?

I think it should be literal everywhere.... though it should be configurable 
of course...

-- 
Pablo I. Lalloni

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