On 11/16/05, Gary VanMatre <[EMAIL PROTECTED]> wrote: > We had some discussion on changing the Clay symbols to make them more JSF > like. I wanted to regroup on this to make sure that this is something that > we want to change. > <snip/> > > The current syntax allow for partial replacement. The symbol is replaced > prior to creating a binding expression. > > <set name="action" value="managed-bean-name.saveAction }"/> > <set name="action" value="@class"/> > <set name="action" value="[EMAIL PROTECTED]"/> > > We proposed that we make the syntax more JSF oriented. > > <set name="action" value="#{shale:managed-bean.saveAction }"/> > <set name="action" value="#{shale:attribute.class }"/> > <set name="action" value="#{shale:managed-bean.attribute.class}"/> > <snap/>
Gary- First of all, thanks for all your work around clay. Since I mentioned I like the "new" syntax, here is my 2c worth (old and new are subjective, what you call the old syntax is really new to me, for example ;-): To set the context for my email, consider this JSP 2.0 page: -- BEGIN JSP -- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <c:set var="greater" value=">" /> <c:out value="2 ${greater} 1" /> -- END JSP -- Output rendered is a String "2 > 1" I'd like to point out two things: 1) Two pass evaluation (container gets first crack and yields "2 > 1", c:out further mods it to "2 > 1") 2) Partial replacement happened before c:out got to processing the value attribute I meant to project a similar approach to the syntax for clay symbols. Now, allow me to re-arrange your observations: > The old syntax resolves the expression before EL binding so exceptions report > the expression post symbol merger. <snip/> I never thought the new syntax would replace the two-pass expression evaluation into a single pass, just like if you need a true second order function, trying to replace with first order functions is a vain exercise. In my mind, this was a fairly superficial change to the syntax, not really requiring major surgery to the internals of the two-pass eval impl. > The new syntax would not allow for partial replacement. <snip/> Why can't the new syntax do partial replacement? See above example in JSP land, retrofit container evaluation -> symbol replacement, c:out processing -> clay <set> processing. > The old syntax is foreign but allows for partial replacement. <snap/> A note about foreign syntax: The EL part of the JSP 2.0 specification goes to some length to convince the reader that EL was needed, when expression languages like XPath and ECMAScript existed. Similarly, as a new clay user, I'd want to know why I'm being subjected to a new syntax (and to that end, the examples like we're fleshing out right now, are a great help). > The new syntax would be more EL like but would require a custom property > resolver. > The new syntax would require creating a wrapper Method and Value binding to > hold the symbols overrides. <snip/> Seems like it, and I'll take your word for it (I'd like to take a look at that code for my own sake anyway, if I find some cycles over the weekend). > > > Well, I'm kind of hedging toward the older syntax. Any thought? <snip/> The ones above :-) Anyway, am not an active clay user (yet), so my opinion is less valuable than yours or Ryan's. Just wanted to follow up on my earlier note about the two syntax versions. -Rahul > > Gary > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]