PART II
Chapter 9: Site and Application Architecture with Ajax 443
rating received. So a request would be made indicating the desire to receive the template
dynamically.
var options = { method: "POST",
outputTarget : "ratingResult" + ratingOptions.id,
template : "dynamic",
templateRender : "client",
payload : ratingOptions.payloadValue + "=" + rating };
Template
Specified By
Render
Location Description Example
Server
(returning
template
string)
Client Server generates the
template contents and
passes it back as part
of the JSON packet as
templateText. The library
is able to use the data
immediately but cannot
cache it.
http://ajaxref.com/ch9/templatesc1.html
Server Server The AjaxTCR library does
nothing and the developer
is required to perform all
template translations on the
server.
http://ajaxref.com/ch9/templatess.html
TABLE 9-1 Summary of Template Usage Patterns (continued)
FIGURE 9-6 Exploring basic client templates