Yeast history

Why Yeast is named Yeast?

We could say that we began the development of Yeast templates in 2001. In those days our template system had a little to do with the current Yeast. In fact, we named it in a different way. Its name was JST-Templates (JST stands from JavaScript Templates). In 2003 two research papers where published in two international conferences: the International Conference on Web Engineering (ICWE) 2003 and the International Conference on WWW/Internet (ICWI) 2003. These publications can be considered as the social presentation of JST-Templates.

Since 2006 JST-Templates evolved up to its current version and name. In 2007, a new paper was admitted for presentation in the International Conference on Web Engineering (ICWE) 2007. By that time, we already knew about the existence of a similar template system, similar even in the name: JS Templates. Apparently, the first news about JS Templates dates from 2005.

So far we have not been worried about this name coincidence because we did not plan a public release of our JST-Templates. But this year, 2009, our plans have changed. We have decided publicly release JST-Templates under LGPL. The first thing we have needed is a new name, being Yeistee our first name candidate. Yeistee is a kind of phonetic transcription of J-S-T. A shorter candidate was Yeist. Yeist is cool so we wrote it down in Google to check if that name had some pejorative meaning. And then Google gave us the last clue. Google said: "Yeist: did you mean Yeast". And, that's all: Yeast has been born.

JST-Templates evolution

Therefore, the history of Yeast is the history of JST-Templates. Let's take a look on its evolution.

The main contribution of JST-Templates is the separation between designer's and programmer's model. Application logic can be developed separately from the presentation layer and meet the interface, a set of JST templates, only at the end of the application.

The model section, where the designer defines the data needed throughout the template, was initially called data section. It was essentially the same as the current one (a JavaScript block with variable declarations), but it was enclosed inside an XML element called <Data>. This tag does not belong to the standard HTML language, therefore it is ignored by the browser. In turn, it does process the tag content, and the data definition does take place.

JST-Templates v. 1.0

In version 1, references to the data variables defined in the designer's model were included in the template by means of a call to a JavaScript function called p(). For example:

<html>
  <head>
  <script>
    function p(arg) { document.write(arg) } 
  </script>

  <Data>
    <script>
      name = "Peter";
    </script>
  </Data>

  </head>

  <body>
    <p>My name is <b> <script>p(name)</script> </b></p>
    <table border="1">
      <script>
       for (var i=0;i<items.length;i++) {
         p('<tr>');
         p('<td>'+items[i].name+'</td>');
         p('<td>'+items[i].price+'</td>');
         p('</tr>');
       }
      </script>
    </table>
    <script>p('<a href="'+url+'">')</script>Dynamic attribute example</a>
  </body> 
</html>

Wherever the designer wanted to insert the data values, he had to write a call to the p() function with the name of the required data, or a more complex expression, as an argument. As you can see, the p() function encapsulates a call to document.write().

Obviously this way of developing templates had several drawbacks:

These facts made the development of JST-templates v1 excessively complicated.

JST-Templates v. 1.5

Version 1.5 introduced several functions that helped in the development. These functions accepted as parameter strings containing HTML portions that had to be processed. This HTML portions may include references to the designer's model variables. These references were enclosed between curly braces ({}).

<html>
  <head>
  <script src='jst1.5.js'></script>

  <Data>
    <script>
      name = "Peter";
    </script>
  </Data>
  
</head>
<body>
  <p>My name is <b> <script>value(name)</script> </b></p>
  Table contents are on Data section and are written dinamically.<br/>
  <table border="1">
    <script>apply(items,
                "<tr> <td>{e.name}</td> <td>{e.price}</td> </tr>")</script>
  </table>
  <script>content('<a href="{url}">Dynamic attribute example</a>') </script>
</body>
</html>

JST-Templates v. 1.5 alleviated only partially the JST-Templates v. 1.0 problems. Templates still remain being not pre-viewable, and the use of JavaScript was patent.

JST-Templates v. 2.0, and therefore Yeast, objectives are precisely focused on the reduction of the presence of JavaScript in the template body, and on making easier the development process. JST-Templates, and so Yeast, are pre-viewable in HTML edition tools, so they can be edited visually. Here you can read more reasons why you should use Yeast templates.