This is open for debate, of course. I consider the approach I've taken with
this annotation to be a kind of developer-time optimization, and I don't
think it's premature. I think your suggestion is quite valid, but I think it
is overkill, in the way that may XML applications use overly deep nested
elements (often, where simple XML attributes could be used instead, to
complete the rough analogy). Does that make sense?
Basically, my constant thought in T5 is to focus on the application
developer, not the tool builder. In many cases, I've deliberately made
things hard for myself, to make things as easy as I know how for the
application developer. In other cases, such as this one, I've taken
shortcuts -- pragamatism over dogmatism. I want those application developers
to type as little as possible, to struggle with the editor as little as
possible.
Using nested @Binding annotations has a couple of minor advantages in terms
of code completion and compile time validty. Someone how types
@Component(bindings="foo") will have to wait until runtime to see the
error. So be it.
On 12/12/06, Ron Piterman <[EMAIL PROTECTED]> wrote:
Hi -
wanted to ask about the component bindings.
Currently I know the bindigns annotation attribute is
String[] bindings.
in the format of "name=value"
Though requiring more typing, which I know *some* of you really dislike,
it is common to split such "complex" values to sub-annotations:
bindings={ @Binding( name="listener", value="listener:doSomething" ) }
or even
bindings={
@Binding( name="listener", type="listener", value="doSomething" )
}
this will be, as far as i can see, easier to maintain and ofcouase to
parse.
what do you think?
just my 3 cent...
Cheers,
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com