MJT: JavaScript Templating Library
Written by on April 5th, 2007 in Ajax News.
The group behind Freebase have released MTJ, the templating library they created for their own use:
Mjt makes it very simple to take data from a web service and format it in a browser, with no server support. The templates are hosted and delivered as static HTML, and they are compiled and applied entirely in Javascript.
Mjt is particularly useful with services that return JSON values and accept a callback= parameter, such as the Freebase service and the Yahoo JSON API. With these services you can use mjt to build “mash-ups” that incorporate data from services on multiple hosts.
-
-
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″></meta>
-
<script type=”text/javascript”
-
src=”http://mjtemplate.org/dist/latest/mjt.js”></script>
-
</head>
-
<body onload=”mjt.run(’top’)”>
-
<div id=”top” style=”display:none”>
-
<!– the template lives inside this div element –>
-
-
running mjt version $mjt.VERSION
-
</div>
-
</body></html>
-
Source: Ajaxian
Original Article: http://ajaxian.com/archives/mjt-javascript-templating-library