The Artima Developer Community
Sponsored Link

Java Buzz Forum
JST: JavaScript Templates

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
dion

Posts: 5028
Nickname: dion
Registered: Feb, 2003

Dion Almaer is the Editor-in-Chief for TheServerSide.com, and is an enterprise Java evangelist
JST: JavaScript Templates Posted: Feb 27, 2005 3:25 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by dion.
Original Post: JST: JavaScript Templates
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
Latest Java Buzz Posts
Latest Java Buzz Posts by dion
Latest Posts From techno.blog(Dion)

Advertisement
You gotta love adding to "JS?" acronyms. Now we have JavaScript Templates, which, as Aslak talks about, can work well in the new world of Ajax. Here’s a JST sample that shows off some features like expressions, for loops, forelse, and if syntax… Hello ${customer.firstName|default:"Mr."} ${customer.lastName}<br/> Your recent orders are: <ul> {for order in customer.getRecentOrders()} <li>${order.orderNum} - ${order.status|capitalize}: ${order.grandTotal} {if order.requestedShipDate < new Date().getTime() && order.status != "shipped"} Please contact customer service. {/if} </li> {forelse} <li>You have no orders yet. </li> {/for} </ul> With Ajax, I think we may see a trend of moving more and more into the world of JavaScript. People who maybe left it for dead years back (when it really was poor), will now see a slightly more mature language. Sure, it isn't perfect, but it is installed in every browser that is out there And, you can even do some AOP, so it MUST be cool ;)

Read: JST: JavaScript Templates

Topic: Brew Unit Test Code? Previous Topic   Next Topic Topic: Struts Flow: continuations for Struts

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use