I have this problem with most templating systems, they talk about
separating code from HTML but then they define all these programming
constructs like if, while, for, etc..  For instance given the example
from the getting started guide:

<html>
  <body>
    {% for greeting in greetings %}
      {% if greeting.author %}
        <b>{{ greeting.author.nickname }}</b> wrote:
      {% else %}
       An anonymous person wrote:
      {% endif %}
      <blockquote>{{ greeting.content|escape }}</blockquote>
    {% endfor %}


In the above "HTML" there are five lines of code, this is not
separation of code from HTML in my book.  There is no ifs, ands or
buts about it, that is code, if a designer looked at that they would
say that is code.  If this were HTML separated from code it would look
more like this:

<html>
  <body>
    <gae:list of="greetings">
          <gae:listItem >
               <div class="name"><gae:field name="author.nickname" /></
div>
               <blockquote><gae:field name="content" /></blockquote>
           </gae:listitem>
    </gae:list>


The developer/programmer would handle the case statement and the
iteration back in the code where it belongs.  All the designer needs
to know is that this will display a list and the list item allows the
designer to layout and style each element in the list.

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.


Reply via email to