[Zope] <% ... %> ?

Jules Allen zope@jules.com
Fri, 11 Jun 1999 11:26:59 -0400


Has it been suggested that the SSI-type syntax of Zope isn't the most
readable thing in the world? Is this even the right list to suggest this
heresy or should I strap on the asbestos underwear and wander over to zopedev?

I've used a bunch of Web-apps such Cold Fusion, PHP, ASP, etc., and the
ones that have the cleanest organization to me seem to allow code blocks
rather than single statements. So, to me, PHP and ASP are easier to
maintain than Cold Fusion.

Doesn't something like this

- - - Cut Here - - -

<%
call "REQUEST.set('thistitle', title_or_id())"
in "PARENTS[0].objectValues(['DTML Document', 'Folder'])"
  if "_.has_key('IsPublic') and IsPublic"
    if "thistitle == title_or_id()" %>
      <img src="/Images/activedoc.gif" width="8"
        height="8"><b><% var title_or_id %></b><br>
    <% else %>
      <img src="/Images/spacer.gif" width="8" height="8"><a
        href="<% var id url_quote %>"><% var title_or_id %></a><br>
    <% /if
  /if
/in %>

- - - Cut Here - - -

seem easier to read than this?

- - - Cut Here - - -

<!--#call "REQUEST.set('thistitle', title_or_id())"-->
<!--#in "PARENTS[0].objectValues(['DTML Document', 'Folder'])"-->
  <!--#if "_.has_key('IsPublic') and IsPublic"-->
    <!--#if "thistitle == title_or_id()"-->
      <img src="/Images/activedoc.gif" width="8"
        height="8"><b><!--#var title_or_id--></b><br>
    <!--#else-->
      <img src="/Images/spacer.gif" width="8" height="8"><a
        href="<!--#var id url_quote-->"><!--#var title_or_id--></a><br>
    <!--#/if-->
  <!--#/if-->
<!--#/in-->

- - - Cut Here - - -

Yeah, easy for me to say "oh just go rewite the parser" and then walk away...

Just a thought.

--
Codito, ergo sum.