WebKit vs. Quixote?

As you may know, I’m a proponent of the WebKit part of the open-source Webware for Python product. It came to my attention yesterday, however, that the new guy at work had a hand in developing a “competing” product called Quixote. After some research, I’ve come to the conclusion that they’re only slightly different ways of doing the same thing… but which is better? Based on only reading about Quixote and using WebKit extensively, here are my initial thoughts.

Both need Apache, both can run through built-in CGI capabilities, and both use an Apache-native module to circumvent CGI slowness. WebKit uses “mod_webkit”, a shared object module designed specifically to work with WebKit, but it requires the separate WebKit application server to run as an additional process behind the scenes. Quixote uses “mod_python”, a catch-all, optionally shared object module that embeds a Python interpreter in Apache itself.

My past experience with mod_python resembles a countryside strewn with blood, guts, and dismembered limbs hanging from gnarled tree branches. All mine. That fucker’s not easy to install… but maybe they’ve tweaked it so it’s no more difficult to install than, say, mod_webkit. Needless to say, mod_webkit is a snap to install.

But if we’re talking about the post-setup-and-install stages of Python web development (by their nature, the easiest stages), then I’m almost sure that the underlying concepts of both approaches are shared between the two. Both are all about taking HTML into Python instead of taking a scripting language (like PHP or PSP) into HTML, so it’s probably only a matter of syntax.

I guess the final decision will be based upon which solution offers the fewer number of undesirables. Until I can download and install all the pieces of Quixote at work tomorrow, it’s one to one: Quixote requires a possibly disfiguring installation of mod_python, whereas WebKit requires an additional, not-all-that-stable long running process in its application server.

More to come, that’s for sure. This’ll be fun!


3 thoughts on “WebKit vs. Quixote?

  1. mod_perl has been a fantastic success… with that as a yardstick, removal of the long-lived background process is a clear win.

  2. Have you done any followup comparison? Quixote now can use SCGI instead of mod_python and seems very quick (and painless – no blood and guts required). I’m still trying to decide between WebWare and Quixote. Future development and maintenance is also a deciding factor.

  3. Rob: The only followup wasn’t pretty: http://neurobashing.com/monkey/archives/000446.html

    After that mess, I haven’t done any followup re: installation hell because I haven’t really had to. One of Quixote’s authors/maintainers now works for our company, so when I went to him about the mod_python bloodbath, he said he’d never used it and opted for SCGI instead. So we’re currently doing some product development in Quixote, but I’m fully insulated from the installation and configuration steps involved. That said, I can’t make an apples-to-apples for you, but if faced with getting Python web apps up on new box, I’d still probably go with WebWare.

    From a web developer standpoint, they’re not all that different, with one glaring exception. Quixote uses Python template language (PTL) and “htmltext” objects to guard against cross-site scripting vulnerabilities. This can be maddening when trying to perform string operations within an [html] method; you either have to kick it out to another (non-[html]) method or explicitly str() things… which doesn’t always work.

    Quixote is much more strict in the structure of the PTL files and their methods (q_exports, or in pages.ptl), where I personally prefer WebWare’s inherent subclassing approach. For example, in Quixote, you have to “import standard” then call “standard.header()” and “standard.footer()” explicitly in every PTL file. In WebWare, however, as long as you subclass a different class object that defines header and footer methods… as long as you don’t override them in the new class, they’re implicitly included. That, to me, seems more intuitive… it may not to you.

    As for future development and maintenance, working with the Quixote guy makes me believe that he’ll personally continue with maintenance or bug fixes in the foreseeable future, where the WebWare guys will fall silent for months and then pop another rev up on sourceforge. I’d say massively important bug fixes aside, though… both are really good at doing the same thing: bringing HTML into Python.

    I guess it’ll just boil down to your own personal preference.

Comments are closed.