On Nov 15, 2005, at 12:20 PM, mario ruggier wrote:
On Nov 7, 2005, at 9:30 AM, Shalabh Chaturvedi wrote:
I'm trying to write Quixote applications that can be re-used easily.
So I do not want to bind the PTL templates tightly with my site
header, footer and other standard 'pieces' of a page. My current
strategy is to use:
import pageui
I have been doing something very similar also, as I expect that anyone
who has had to manage the building of non-trivial pages has also. I
have been meaning to reply to this earlier, but my code is not ready
for just posting, so I took a little time now to review what I had
done, and write it up somewhat clearly.
I have also included info of how I handle rather complex page
components, that have their own behaviour and interaction. These also
know how to talk to the page_info object.
My current implementation, for quixote, is not as clean as the partial
description in the attached file. As I will probably be revising it
anyway, and possibly doing it for qp, I would appreciate any comments
you may have, even suggestions of better names. I also would be happy
to converge this with other similar efforts that may be going on... QP
already has a very simple idiom for rendering a page, namely that
publisher.page() renders by calling publisher.header() and
publisher.footer(), that are therefore easily overridden by the site's
publisher. What I describe is actually not very different, but more
general i think. I'd also be interested of ideas of how best to add
this onto qp... but ill take that to that list.
Your scheme looks intersting. I'd like to see an example of how a page
is defined, for example what would go inside the method for a page:
def somepage [html] ():
"what goes here"
Or would you construct the page_info object somehow and then call a
render() method?
I think it would be useful to keep the usage simple and close to
standard Quixote as possible. I can also see utility in collecting the
js and css references at the top and I'm all for standardization of
this mechanism.
Thanks,
Shalabh
_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users