[Zope] <% ... %> ?

Jim Fulton jim@digicool.com
Tue, 15 Jun 1999 07:45:39 -0400


Jules Allen wrote:
> 
> Has it been suggested that the SSI-type syntax of Zope isn't the most
> readable thing in the world?

Yes.

> Is this even the right list to suggest this
> heresy

Of course.

> or should I strap on the asbestos underwear and wander over to zopedev?

I hope not.
 
> 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.

Interesting observation.
 
> 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 - - -

Well, not to me.
 
> Yeah, easy for me to say "oh just go rewite the parser" and then walk away...
> 
> Just a thought.

Here's something to keep in mind.

A central notion of Zope is that there is not *one* language
that is perfect for every task or every user.  Zope objects
can have methods written in a variety of languages.  Currently, it's
not uncommon to have Zope objects with methods written C, Python,
SQL, and HTML, all in the same class.

Zope is an open system.  We encourage people to add new method types
to Zope.  If someone wanted to implement some sort of ASP or PHP for
Zope, I wouldn't mind at all, although I doubt that DC would do it.

I would object to a DTML input format designed to look like ASP because
the semantics of DTML and ASP are so (perhaps subtley) different.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.