[Web-SIG] Ruby on Rails for Python
ianb at colorstudy.com
Wed Nov 17 18:15:52 CET 2004
Peter Hunt wrote:
> I'm putting together a competition framework for Python which is
> similar to Ruby on Rails. I'm going to reuse as much of other work as
> I can, so I am not saturating the market with YAPWF. I'm going to use
> Cheetah and SQLObject, and it's going to generate a WSGI application.
> My question: is there a good stack of WSGI middleware for sessions and
> other stuff like that?
Well, WSGIKit has a session middleware, among the other middleware I
noted before. It's not that great, but it should at least serve as a
placeholder so you can work on more interesting aspects.
If you have other ideas for middleware, please bring them up here, and
maybe we can collaborate.
I don't really know much about the internal architecture of Rails, so I
can't say much more. I think it has object publishing of a sort;
wsgikit.urlparser may still be useful, if the publishing starts with
disk files, then digs deeper into the objects (urlparser doesn't dig
into objects, but it generally hands off control at the first
opportunity it gets, so the object itself can handle the rest of the
URL). There could be a number of interesting enhancements here as well,
some of which might fit into this project, some which might not.
Facilitating URL introspection would be quite useful.
Most of it will probably be libraries more than middleware. Which is
probably better, easier to test, understand, and reuse. Some of my
middleware should be stripped down so it's just a smaller wrapper around
more generic libraries.
For form generation, you might want to look at my validation project at
svn://colorstudy.com/trunk/Validator -- I haven't settled on on the
module names, but the basic interface is fairly mature. I'm also
interested in ways of flattening the whole process by embedding the
validation requirements in the form's HTML.
Ian Bicking / ianb at colorstudy.com / http://blog.ianbicking.org
More information about the Web-SIG