Simon Willison’s Weblog


Friday, 4th July 2003

Nail, Bang, Head

D. Keith Robinson:

[... 210 words]

Simple Python Sockets

Moshe Zadka: Networking for non-programmers (and a follow up), via Hans Nowak. A nice gently introduction to sockets, with example code using Python’s socket library.

Diagonal shapes with CSS

Information on Border Slants (via Paul Hammond). Border slants are the effect whereby diagonal lines can be created using pure CSS, by taking advantage of the fact that thick borders around a box meet at an angle. This article describes the effect in detail and shows how it can be used to achieve a number of interesting shapes, then goes on to show off with an impressive Valentine’s Day Heart. See also Tantek’s awesome pentagon site map and A Study of Regular Polygons.

XML-RPC Errata

Fredrik Lundh: Unofficial XML-RPC Errata, a work in progress. It’s good to see that the unicode limitation has finally been cleaned up. What would be really useful is if someone could work out a list of all of the older implementations that only support ASCII strings.

Reintroducing HTML

Jay Small: Reintroduce yourself to HTML. A call to web authors everywhere to go back to their roots and realise that HTML is not something that should be avoided. He makes some great points, such as the following:

[... 161 words]

Browser innovation is anything but dead

Rafe Colburn slams Marc Andreessen for his recent comments regarding browser innovation. Marc thinks browser innovation has been dead for the last five years. To make a statement like that he must have missed out on Mozilla, Firebird, Safari, Opera and all the other Gecko variants. Which leads to the worrying conclusion that he’s either still using Netscape 4 or (even worse) he browses with IE!

Custom XML templating with PHP

Dynamic XML conversion using the SAX parser and a stack is the best new article I’ve seen on PHPBuilder in a very long time. It introduces several interesting ideas. The first is something I’ve been thinking about for a while now: using PHP’s output buffering to implement a kind of templating system so that all of the scripts in a system just have to generate an intermediate content type, then the output buffering function adds on the HTML framework and finalises the page. The second idea is ingenious: invent XML elements to represent specific behaviours, then handle them with a SAX before the page is displayed. Here’s some example code from the article:

[... 280 words]

2003 » July