On Thursday, March 17, 2011 7:51:47 PM UTC+1, ss.require wrote:
>
> > UiBinder is not a templating tool, it's a "UI building" tool. 
> > templating, use Messages or SafeHtmlTemplates. 
> I understand that clearly. In other words, Why does GWT not provide a 
> templating tool.?


I don't have the answer, but I believe this will come one day or another, 
particularly given the Cell widgets and the new orientation they're taking 
for widgets: 
http://code.google.com/p/google-web-toolkit/wiki/CellBackedWIdgets
The real question (other than "when?") is: will they augment UiBinder, 
create a new thing, or integrate Closure Templates?
 

> For example, like JSP. In general, a templating tool 
> is much more clever and simple solution than UI binder. Messages or 
> SafeHtmlTemplates - It's not the case, It's for another purposes: 
> Messages - for internalization,


But wouldn't you internationalize many things that use a template? (such as 
your "Hello MAX" example)
 

> SafeHtmlTemplates is related to security.


No, SafeHtml is about security, and SafeHtmlTemplates is a templating tool 
producing SafeHtml and enforcing that "security", because many uses of 
templates are about putting "external values" into the placeholders (whether 
the user provided the values, or your got them from the server –you 
shouldn't trust a server, because you cannot trust the network between the 
app and your server, so it might actually not be *your* server that 
responded–).
 

> I don't see any performance reasons not to do a templating 
> tool. 
>
> > In the case of your "Hello MAX", assuming its part of a bigger "UiBinder 
> > template", I'd rather put the ui:field on the <div> and use setInnerHtml 
> or 
> > setInnerText on it, building the "template" in the code (using Messages 
> or 
> > SafeHtmlTemplates) 
>
> In this case It's much more simple and elegant to use a template in 
> only place than make a lot of redundant code throughout application. 
>
>  
 Using a SafeHtmlTemplates, you'd have a single template in one place, and 
then use it wherever you need.
Note that I was presuming this was only a part of a bigger UiBinder file 
(one with widgets et al.) Otherwise, of course, you'd only use 
SafeHtmlTemplates or Messages, without UiBinder (but didn't we agree on that 
already?)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to