[Grok-dev] skin/layer status?
Fernando Correa Neto
fcdoth at gmail.com
Wed Aug 8 20:13:02 EDT 2007
On 8/7/07, Martijn Faassen <faassen at startifact.com> wrote:
> Hi there,
> Since it looks like I will need it to support REST, I'm wondering what
> the status is for skinning and layers in Grok. Kevin? Darryl?
Last weekend I spent some time investigating on how to integrate
genshi templates in grok. While doing that, I had a look at
you-know-who (pylons, tg, etc) and also what wsgi guys are thinking
After all this, I figured that doing that using a universal but still
pluggable template system would make sense. I mean, using something
like buffet would be cool.
Since grok can run on paste now, it gives us some options about how it
One thing that I thought was that the content provider/producer system
(lets say grok with page templates here) is something that can be
adapted to provide any kind of output, well xml at least.
So thinking in grok terms, you could have grok views that generate a
variety of different output like xhtml, xml (for REST with
xpath/xlinks) or any other format.
Say one have a master view with a bunch viewlets or macros, that
produce content like:
Stuff that goes into the head
Stuff that goes into the left
Stuff that goes into the main area
Very minimal and straight. So grok could act like a content generator
for a wsgi app like genshi that will apply all the theme for that kind
But this is completely optional, since one can produce pretty content
out of grok with page templates.
So grok is the one capable of using page templates with TAL for
generating that kind of content and having the same access to zope
Thinking of content provider/producer, the same can be applied to
REST. With wsgi you can map a RESTfull interface to /rest for example
AND if one choose to do some kind of transformation on top of REST,
one can plug a middleware for doing that and so on.
It would be pretty nice if the template plugins could provide some
helper grok views to simplify the content production for
post-processing in wsgi.
I know it discussed about templating/skinning some time ago and we did
mention genshi, but not as a pluggble way though.
By sticking with some kind of pluggable templating system like buffet,
it could bring a world of options for grok.
Options is something that we have. We just need to pick them wisely.
> Grok-dev mailing list
> Grok-dev at zope.org
More information about the Grok-dev