Miro: light-weight JavaScript rendering engine

Edwin Khodabakchian and Olivier Devaux started off integrating Google Custom Search capabilities into Vulnpedia.com, using the Google JavaScript tools. They wanted to go beyond this, and tell their story in Experience #1: Miro, Ajaxlets and the Google Custom Search API which goes through various iterations of the project. It includes a tutorial on Miro, A Light-weight Javascript Template Engine:
Miro is a light-weight template engine for applications which take advantage of Ajax. It focused only on one task: how to make it easy for developers to convert in the browser, a Javascript object or an XML DOM object into a fragment of HTML code that can later be assigned to a div using div.innerHTML. As an Ajax developer, you are forced to make these types of conversion 1) each time you want to dynamically change in the client a part of your document (example: sort a list of rows) or 2) each time you have made an async call to the server using HTTPRequest or <script...> and want to present and display the result to the user. The goal is to get rid of htmlFragment += "some <a xhref=\"" + var1 +"\"> which is very painful to generate and even more painful to maintain.
Miro looks similar to Apache Velocity, and comes with an ant task that will generate a JavaScript function for each template. Vulnpedia

Miro: light-weight JavaScript rendering engine

Edwin Khodabakchian and Olivier Devaux started off integrating Google Custom Search capabilities into Vulnpedia.com, using the Google JavaScript tools.

They wanted to go beyond this, and tell their story in Experience #1: Miro, Ajaxlets and the Google Custom Search API which goes through various iterations of the project.

It includes a tutorial on Miro, A Light-weight Javascript Template Engine:

Miro is a light-weight template engine for applications which take advantage of Ajax. It focused only on one task: how to make it easy for developers to convert in the browser, a Javascript object or an XML DOM object into a fragment of HTML code that can later be assigned to a div using div.innerHTML. As an Ajax developer, you are forced to make these types of conversion 1) each time you want to dynamically change in the client a part of your document (example: sort a list of rows) or 2) each time you have made an async call to the server using HTTPRequest or <script...> and want to present and display the result to the user. The goal is to get rid of htmlFragment += "some <a href=\"" + var1 +"\"> which is very painful to generate and even more painful to maintain.

Miro looks similar to Apache Velocity, and comes with an ant task that will generate a JavaScript function for each template.

Vulnpedia


December 1st, 2006

Tagged View

Tags Similar

Posts Fresh +

Categories View

Archives View