On Oct 31, 2006, at 7:15 PM, Jeff Shell wrote:

On 10/24/06, Gary Poster <[EMAIL PROTECTED]> wrote:
It might be nice to have zc.resourcelibrary be able to somehow serve
z3c.zrtresource files too...it doesn't right now.  FWIW, right now in
lieu of zrtresource I just use <script ... tal:content="string:
/* ... JS that specifies dynamic variables and calls ... */
"></script>.  Simple, and encourages delineation between library and
usage; but a bit hacky, and unfriendly to designers.

I do a lot inline in my Python code, using our nevow.Stan inspired tag
generation system and little bits and pieces I threw together to ease
in generating short bits of JS from within Python. In particular,
marshalling of basic Python structures to Javascript using a modified
`jsonencode` module from the `simplejson` package.

What are the modifications? The things you list below all sound like normal simplejson stuff.

Among other things, it lets me use normal Python dictionaries,
strings, lists, numbers, etc, for use in generating code. `jsonencode`
ensures that everything is escaped properly. It gets to be handy to
build on, especially when wanting to generate a Javascript call and
supply it with a big list of generated dictionaries.

Other JS-related bits to know about (you'll have to do your own
reading sometime :-): http://zif.hill-street.net/headincludes (WSGI
variation on resourcelibrary), http://zif.hill-street.net/gzipper/
(WSGI, gzips all output for smaller browser page sizes), http://
zif.hill-street.net/jsmin/ (WSGI, compresses JS for smaller browser
page sizes), and http://svn.zope.org/z3c.javascript/ (resourcelibrary-
aware collection of mochikit, dojo, et al).

Ah, the real reason for my response here: how does one use third party
WSGI "Middleware" with Zope?

zope.paste, maybe (http://svn.zope.org/zope.paste/)? I think that's what Jim Washington has used.

Alternately, does anyone have any
experience running Zope in another WSGI supporting server?

There are quite a few things out there in WSGI land that I'm
interested in, but I've never quite understood how they work together
on their own and/or with big systems like Zope.

By the way - I've had some issues with the dependency tracking in
zc.resourcelibrary. Is there a tracker where I can post said issues?
(if I can remember and reconstruct them, that is)

Yeah, the dependency code was pretty badly broken until Marius Gedminas fixed it within the past week or two. Try it again.

Gary
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to