Re: Straight templates (Was: Re: [Maypole] model_class issues on 1.7->2.x upgrade?)

From: Dave Howorth (Dave.Howorth at acm.org)
Date: Sat Dec 04 2004 - 18:35:36 GMT


Jesse wrote:
>>>>>> I just upgraded Maypole from 1.7 to 2.04. Several
>>>>>> applications were unaffected, but one relatively complex
>>>>>> one, which has some authentication juju going on, had
>>>>>> problems.
>> Yes, it was in my driver. I was following the instructions that are
>> in Maypole::Manual::Request, and that are on the Wiki's
>> authentication page. Perhaps these should be changed :-)

Hi Jesse,
The docs are quite out of date in a number of places. I'm reviewing them
so I hope they'll improve soon.

If anybody else knows of particular issues in the docs and wants to mail
me directly, I'll try to fix them also.

> Good point. I've made a small change to the wiki to check
> r->model_class before calling method on it.

Simon,
Authentication isn't an area I've played with yet, so if you could have
a look at Request.pod and suggest any changes for that, it would be great.

>>> 2.x authenticates plain templates but 1.7 didn't. But that
>>> shouldn't cause a problem in itself, it depends what your
>>> authenticate() method is doing.

Reading this correspondence, I was struck by another aspect of the
vanilla HTML files and plain template files (with no Maypole objects)
question. Assuming that for some reason one wants to have the Maypole
application handle them (pretty URLs?) it would make sense for Maypole
to short-circuit their handling, especially in a CGI environment.
There's no point in even connecting to the database, let alone going
through all the class initialization, if all you're going to do is copy
an HTML file to STDOUT, or invoke TT.

Cheers, Dave

_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT