Turbo Power: TurboStan

Thu 12 January 2006

Filed under Blogs

Tags Cool Geek

TurboGears(TG) is a love it or hate it web

framework. People who are merely lukewarm and in serious denial. IAMAGP

[I am not a good programmer]. In fact, some people would say that I am a system

administrator. Whatever that means, it doesn't frighten me. Turbostan is new

hotness in a template. Don't mistake my enthusiasm as signs of a

'new toy whore'.

TurboGears does a number of things correctly. First, they are reusing lots of community

code. This has a downside that causes them to change large bits and pieces, especially

right now during heavy development. If they don't like a standard, then it becomes

cast aside in favor of something else, that better addresses the needs of developers.

For casual users, at this time, that may be very annoying. API changes are alway a PITA.

Kevin Dangoor appears to do a very good job of directing the projects and resisting his

own prides and prejudices. For instance, TurboGears uses Buffet. This allows multiple template engine support without having lots of bitter complex hacking.

Kevins prefered template system is Kid. I have

heard compliants (mostly in IRC) that Kid is slow (when rendering complex pages). Some

devs have bitterly moaned about Kid grabbing only the worst parts of it's predecessors.

One in particular felt that Kid brings all the limits and actually does nothing to extend

it's capabilities with respect to it's forefathers. He felt that Kid was written in envy

of template systems available for languages other than Python while trying to include the

cool parts of what was in Python. Needless to say, he feels they've failed up to now.

I haven't take a consenus or a poll. I just wanted to layout some of the traffic I have

seen on Kid. Templates are a fundamental part of rapid web-app development. Templating is

a practice that has penetrated virtually every layer of the software world. I sincerely doubt

that I could do any good to explain that statement. If you don't understand, look at the

things that happen in offices. Most every profession uses templates if they use software.

As a natural next-step your template creates and defines your capabilites and limitations.

Lots of what you need out of a template is very simple: Less typing. The number one

goal is to avoid repeating yourself.

Basic Kid template example:

&lt?xml version='1.0' encoding='utf-8'?&gt
import time
title = "A Kid Template"
&lthtml xmlns="http://www.w3.org/1999/xhtml"
    &lttitle py:content="title"&gt
      This is replaced with the value of the title variable.
      The current time is ${time.strftime('%C %c')}.


Up To Something © Joshua M Schmidlkofer Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More