JOTWeb Introduction

  1. What is JOTWeb
  2. JOTWeb Benefits
  3. Why Another Web Programming System?
  4. Overview
  5. Performance
  6. Requirements

What is JOTWeb

A web programming and templating system for Python programmers. It is currently experimental, but I don't mean "incomplete" so much as "subject to change".

I'm currently using JOTWeb to implement a dynamic web-site for a personal project I'm working on. Over the last year I spent quite a lot of time trying to get other programming environments for dynamic sites to work for me, and none of them I found to be as simple and elegant as the Python programming language that I enjoy working with so much.

JOTWeb Benefits

The following are some of best reasons for using JOTWeb:

Why Another Web Programming System?

The short answer is that I couldn't find another system which felt simple and obvious to me. Documentation tended to be poor for most of them, but the biggest problem was finding something that works the way I expected. I love Python because it's simple, powerful, and works the way I expect it to. I couldn't find another system that I could say the same about. Over the last year I've looked at many systems including Zope, PHP, Quixote, Skunkweb, Webware, and more...

One night, after getting frustrated at yet another web application system that I had been trying, I thought about what the ideal system would look like to me. JOTWeb is the result of that soul-searching.

As a background, I'm a very experienced Python programmer, but not really a web developer. I just happen to have some projects which require web presentation.

I want something that has a good separation of the presentation and the programming. Having the code and the HTML inter-mixed ends up being a nightmare for maintenance, and worse when you have an end-user who wants to change the look of some text.

Overview

JOTWeb is a system for building web applications in Python. It's goal is to be a simple and obvious way for building dynamic web sites. I have reviewed many other web application packages, particularly for Python, and haven't really found anything that I could feel comfortable with.

JOTWeb provides three main things for web development:

It boils down to this: I'm more of a Python programmer than a web programmer. However, I have a number of projects that I want to do which require web interfaces. I looked at a number of existing tools, but couldn't find one that felt natural, light-weight, and easy to understand. After my last attempt at trying one of these, I spent some time thinking about what my ideal web programming system would be. JOTWeb is the result.

Performance

I have little real-world data at the moment, but I did do some performance testing recently... I set up a simple script that did "wget" on a URL 1000 times on my laptop (1.2GHz, 768MB RAM). I ran it in 3 different ways.

First of all, I ran it against "http://127.0.0.1/", which is a static page served by Apache. This was a static page generated from the JOTWeb example "index.html". This took 13.9 seconds for 1,000 page retrievals.

Next I ran JOTWeb with template caching enabled (JOTWeb 1.07 with SimpleTAL 3.2 required). This same page, dynamically generated this time, required 18.7 seconds. In other words, the overhead for 1,000 page generations was about 32.6% more than for a static page generated by Apache. Note that this page calls the Python time.strftime() function on every page load and provides some dynamic content.

Finally, I disabled the cached templates in JOTWeb, which is how the system operated prior to version 1.07. This run took 36.0 seconds, for an overhead of around 255%.

Admittedly, this "benchmark" is rather limited, but it is a place to start. I'm quite happy with a 33% overhead above static Apache pages. That's quite within what I consider acceptable. Of course, more complex pages that have more dynamic content will require additional time to process, and I haven't really done any optimization yet.

Oh, one last measure... If I take the static HTML file generated for the first test with Apache above and put it under JOTWeb, I'm seeing 1,000 laps taking 15.8 seconds. So, static content served from under JOTWeb is about 7% slower than if it were served directly from Apache.

Requirements

JOTWeb has enjoyed a very rapid development because it relies heavily on a few other components. These are:

Index