durusmail: quixote-users: Switched from Zope to Quixote and ZODB (Patch)
Switched from Zope to Quixote and ZODB (Patch)
2003-11-24
Thomas Guettler (3 parts)
2003-11-24
2003-11-25
2003-11-25
Switched from Zope to Quixote and ZODB (Patch)
Skip Montanaro
2003-11-24
    Thomas> The patch includes a better error message for developers: If
    Thomas> there is a method called "foo", but this is not in the _q_export
    Thomas> list, the error message says, that there is such a method, but
    Thomas> it is not in the _q_exports list.

As long as that message is only emitted when SECURE_ERRORS is 0 that's okay,
otherwise I think that tells the user at the other end more than they need
to know about your system.

    Thomas> Next issue: I use quixote because it is small. I don't use the
    Thomas> form class or PTL. I would like to know how many people do this,
    Thomas> too.

I use both, quite happily so far.  As people have indicated in multiple
places, PTL is the complete reverse of what most web frameworks do, make a
robust programming language subservient to HTML.  PTL makes HTML subservient
to Python, but makes it less verbose to emit HTML fragments.

I'm coming to Quixote from Mason (based on Perl), which does things the
usual way.  While you have the full power of Perl at your disposal, it's
sometimes tough to tell that.  You always have to do special things to get
at it.  Here's the beginning of the Musi-Cal search component:

    %                           #       -*- perl -*-
    <%$m->comp("searchtop", title=>$title, keywords=>["banner"],
               city=>$city, state=>$state, country=>$country)%>
    <%$m->comp("refinecitysearch", city=>$city, state=>$state,
country=>$country,
              keywords=>$keywords)%>
    % if ($howmany == 0) {
    

We're sorry. Your search didn't return any results. Please check to make sure you entered your information correctly.

% } else { Any line which begins with a "%" is Perl. Similarly, any expression enclosed in <% ... %> (which can nest) is a Perl expression. Everything else is HTML. I'm not much of a Perl person, but it seems to me that the above would have been easier to read if Perl was the default, and HTML was emitted in strings. Skip
% my $max = ($howmany <= $start+$nhits ? $howmany : $start+$nhits); <%$m->comp("nextprev", start=>$start, nhits=>$nhits, howmany=>$howmany, center=>"(".($start+1)." to ".$max." of $howmany listings)")%>
<%$m->comp("displaysearch", editor=>$editor, howmany=>$howmany, items=>$results)%>