Vjeran Marcinko <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]