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.
In article <4.1.19990611111756.00a14c60@jules.com>, Jules Allen <zope@jules.com> writes
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? here here; the current zope dtml syntax is really a nightmare. I would be even more extreme and as has been suggested elsewhere would use some open and close delimiters to contain arbitrary python. Conceptually this is already provided for with call, var etc + an external function. I really like the tclHTTPD syntax in which every active bit is supposed to return a piece of text (possibly empty). The chosen delimiters '[' & ']' are there for tcl's convenience, but the same idea could be easily applied to '<--#' '-->' - - - 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.
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
-- Robin Becker
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.
participants (3)
-
Jim Fulton -
Jules Allen -
Robin Becker