Yeast in the server side

Once the designers' work is finished, programmers can proceed. The model section in the Yeast template shows the dynamic data that the page needs to be displayed, thus reducing the communication need between designers and programmers.

The programmer must implement the code executed when a request for a page is received. This code will fetch the final data from an object model, XML, or DBMS (the programmer's model) and will generate a string with JavaScript code that will replace the template model section. The Yeast templates server preprocessor can be extremely lightweight; just string substitution. E.g.: let's assume that the actual name is "Mary" and there are three items: a leather belt, a handbag and an umbrella; then the page sent to the user will be just as the example of the above figure, except for the model section:

<script yst="model">
  name = "Mary";
  items=[{name:'Leather belt',price:1},
         {name:'Handbag',price:79},
         {name:'Umbrella',price:18}];
</script>

You can perform the string substitution as you want, even using any programming language or platform. Nevertheless, we provide you with an API for Java applications: Yeast Server. The aim of the Yeast Server is to help to web application developers by managing tasks related to the management of the Yeast templates, and its storing infrastructure, and to the processing of the templates.

The use of the tools provided by Yeast Server implies a reduction of the amount of code to write. Moreover, part of that "code" can be written in a declarative, not programmatic, way, allowing making changes without recompilation. This feature can be useful in the last part of the development, when both presentation and business logic parts, developed by different skilled teams, must be put together and tuned. Currently we are planning to port this Java-API to PHP.