lying about programming the Web

2009-02-15 @ 20:37#

programming the Web is a lot more enjoyable when you remember that it's just one giant state machine.

too many times, i forget that. too many times i waste my time trying to convince myself (and my users) that the Web is not a state machine. always turns out badly.

true, there are times when i can pull it off. usually when the application is so simple that no-one cares that it's all just state changes. but in the cases where real work must be done, work that mimics human office work closely (accounting, filing, editing, etc.) it gets messy when i try to shade the truth.

it doesn't help that most programming environments for the Web try to hide the truth. the ones that don't force me to define a set of resources and the state transitions between them (single-page web apps). the ones that try to get me to view the Web as my desktop environment instead of the other way 'round (post-back). the ones that do all sorts of silly things behind the scenes to keep up the fallacy while screwing with the state machine itself (sessions).

it's so much nicer when i work with a set of tools that expose the actual Web programming environment directly. you know that one, right?:

REQUEST: **************
GET /xcs/data/weblogs/962 HTTP/1.1
Authorization: Basic *************************

RESPONSE: **************
HTTP/1.1 200 OK
Date: Mon, 16 Feb 2009 01:27:31 GMT
Expires: Mon, 01 Jan 0001 01:00:00 GMT
ETag: "WQsbKXo24J7w9ucnGbsJLg"
Cache-Control: private,must-revalidate
Content-Type: text/xml; charset=utf-8
Content-Length: 1339