kiwitobes.com

kiwitobes.com

Author, Software Developer, and Data Magnate

kiwitobes.com RSS Feed
 

web.py and the 2 minute wiki

A lot of people use my applications and then email me asking me which language and toolkits I used to build them. The language for both tasktoy and lazybase was Python, which is my favourite programming language. tasktoy was built using Zope and LazyBase using Turbogears.

Recently I built a new application, which I’ll be sharing with the world shortly (since I’m taking Spanish classes now, it’s a tool to assist with learning a foreign language — you can email me if you’re curious to hear more). Since I’m a big fan of reddit, I decided to try out web.py. I was amazed at the simplicity with which I could download and “install” the necessary pieces, and how quickly I could get a basic application up and running.

This got me thinking about all the tutorials for other frameworks, which show how to build a wiki in x minutes. The number typically doesn’t include time to install and configure the framework. So, as a simple test, I decided to see how fast I could, from a fresh python install, download and install the necessary components and build a wiki. My only requirement was that it support multiple pages, basic formatting, and internal and external links.

First, a few disclaimers:

  • This is an uncontrolled experiment, not intended to prove anything, simply to satisfy my own curiosity. I make no claims about the superiority of any language or framework.
  • This code was written very quickly. It is intended to work, not to be pretty, extensible, maintainable, or use design patterns.
  • I had already used web.py for another project, so there was no learning curve. I did not consult any documentation while writing the code.
  • This certainly does not represent the best way to use web.py. I put HTML in the code instead of using templates and I used an embedded database.

My results were:

Download and install web.py: ~20s
Download and install markdown.py: ~1m (mostly clicking through sourceforge)
Write the wiki code: 2m21s (the only part that I timed with a stopwatch)

I wanted to post the code, but Wordpress doesn’t seem to render it properly. You can look at it here.

Finally, a screenshot of the program in action:

6 Responses to “web.py and the 2 minute wiki”

  1. Gravatar
    1
    Sven:

    Wow, that is very cool!

  2. Gravatar
    2
    postlogic:

    Whoa, that’s just neat. I currently use Code Igniter for PHP, and it’s nowhere near as RAD as that ;-)

  3. Gravatar
    3
    Ben:

    Very cool but depot isn’t far away. I’m sure we can top 2.21s…

    Coming soon.

  4. Gravatar
    4
    Brian:

    2:21 not ~2s ;-)

  5. Gravatar
    5
    k4ml:

    simple and nice example.

    rather than using ‘view’ as the class name, I prefer to named it ‘wiki’ (verb vs nouns). this fit well in web.py paradigm where you’re ‘GET’ting nouns, not verb.

  6. 6
    web-ology.com » links for 2006-08-12:

    […] kiwitobes.com ยป web.py and the 2 minute wiki (tags: python wiki web.py web programming development tutorial code) […]