Since Tapestry 4.0 will be a transition release, I would (still) tend in
favor of #2 with default to «ognl» in specifications and to «literal» in
templates. This will be one less thing to do when migrating from 3.0 to
4.0.
I did my migration (around 150 pages or components) as of alpha-3 and
default prefixes were annoying enough to make me put prefixes
everywhere.
I also (still) think that we need something consistent. It is a bit less
«elegant» to type «listener="listener:x"» than «listener="x"», but this
is a special case :
1. the «listener» parameter accepts only ActionListeners ;
2. the name «listener» explicits the nature of the value, not it's
function, so one could perfectly call it «on-submit» for Form,
«on-click» for DirectLink, etc (to be completely honest, I think
that's what I would have done). Then, «listener:»
«on-submit="listener:doSubmit"» doesn't looks so useless...
Since we *must* link subject to Tapestry's philosophy, here are some
links to some values : ^_^
* Simplicity : you don't need experience about components you use
to know what you are giving to them.
* Consistency : default prefix is defined once for all and thus is
shared over any component or page.
* Efficiency : ..... maybe we avoid some parsing and lookup
time.... but also, more likely, some time thinking about what is
the most intuitive default or looking for what the default is.
* Feedback : when things go wrong, you immediately know which
values where given to your components. This is simply easier to
understand since you don't have to remember what the default
prefix is.
«The decisions you make early in a project should not come back later to
haunt you» statement is no more true :
* as component-user, if you rely on a component build by someone
else and he changes the default prefix, you have to hunt the
references to this component to change then accordingly ;
* as component-provider, if your intuition is not the one of your
users, your earlier decision will come back to haunt you...
«The simplest choice should be the correct choice» doesn't seems linked
to this subject but feel free to correct me :-)
Hope this helps.
Mikael.
Le mercredi 20 juillet 2005 à 11:35 -0400, Howard Lewis Ship a écrit :
> With the new betas out, I'm thinking that it's become easier to
> discuss the binding prefixes.
>
> I like how succinct the prefixes are but if we can get a consensus, we
> can change things around.
>
> I would suggest that, if we remove explicit default binding prefixes
> on parameters, we still use a simpler system of defaults: literal:
> for HTML (or other templates), ognl: for XML and elsewhere (such as
> annotations).
>
> <form jwcid="@Form" listener="doSubmit">
>
> vs.
>
> <form jwcid="@Form" listener="listener:doSubmit">
>
> vs.
>
> <form jwcid="@Form" listener="ognl:listeners.doSubmit">
>
>
> I prefer #1, but would be satisified with #2. Either is better than
> #3 (as it stands in Tapestry 3.0).
>
> What are people finding now that they are (hopefully) playing with Tapestry?
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]