Home Login Create account Contact Help
Close

Login to your account

Other Options

Comments feed

In response to XML or Text for Python Templates?

There are a number of (very good) templating systems and languages available for Python. They fall in to one of two camps; either they are XML based, like Genshi, or they are text based, like Mako. Most programmers favour one or the other, but there is far from a consensus over which is better.

I'd like to use this debate to gather reasons for using one over the other in the context of web development. I suspect there will be no clear winner, but it should serve as a useful resource for those faced with the decision!

...

NB. You can post code with the [code] bbcode tag. Many languages are supported. e.g.

[code python]

print "Hello, World!"

[/code] 

Anthony Briggs argues for "XML"
Wed, 17 Oct 2007 by anthony
Rank 5. Average +2.0 ( 2 votes )
(X)HTML based templates allow you to split work between web designers and programmers.

(X)HTML based templates allow you to split work between web designers and programmers. The designers can do their design/mock up thing without having to know the code, then the developers can add the code parts later on.

With text-based templates, you have to break up the HTML in order to turn it into a template, so your maintenance phase (ie. a site redesign, or adding extra page elements) becomes much harder than it should be.

From a business-head perspective, it's also much easier to find a good programmer and a good designer, than it is to find those freaks of nature who can do both.

Return to debate