[Web-SIG] WSGI Webware/WebKit

Ian Bicking ianb at colorstudy.com
Wed Sep 29 23:48:49 CEST 2004


I just committed some code to the repository 
(svn://colorstudy.com/trunk/WSGI/) that implements WebKit ontop of WSGI. 
  It's not complete, but much of the core is there.  There's no 
configuration, no AppServer or Application object, no session, and the 
path (URL introspection) methods are missing.  The path methods in 
Webware are a mess, which is why I left them out.

AppServer and Application objects don't really apply in this context.  I 
hope to create dummy objects for those few places where they are 
exposed.  Configuration probably will be implemented in a different 
layer, and all the configuration will change, since it's a different 
environment you are configuring.  Session will probably be in a 
different layer as well, maybe with a wrapper to implement the WebKit 
interface around a session that may not have that interface.  The path 
methods will just wait.

Also, there's no URL resolution.  I'm just using dispatch.py for now, 
which is a naive way of dispatching.  But I plan to keep dispatching in 
a separate layer -- this way different frameworks can live side-by-side.

Instances of WSGI.WSGIWebKit.wkservlet.Page are WSGI applications; 
basically Page.__call__ does the work.  Most of the rest is copied from 
WebKit with some cleanup; there's some small portions that were changed, 
like HTTPResponse.__init__, write, commit, and deliver, and 
HTTPRequest.__init__.  The changes were fairly easy to do.

I also changed the tests to be unittests.

-- 
Ian Bicking  /  ianb at colorstudy.com  /  http://blog.ianbicking.org


More information about the Web-SIG mailing list