Tuesday, November 23, 2010

The Stateless Web Not Harmfull

We've all done it. Every web developer worth their salt has complained about HTTP being a stateless protocol. And this makes web applications much more difficult to write. Waa waa waa, moan moan moan.

Stop and think for a moment. The early web was a distributed repository of information. This information didn't need state. In fact, if the HTTP protocol had included state, it would have made the early web a much more fragile infrastructure. As designed, for the purpose at the time, the web was very well designed.

Now, the advent of web applications did cause a challenge. The lack of state was a huge problem. But ... it's been solved. By using cookies, browsers and webservers layered a perfectly workable state mechanism on top of the underlying transport mechanism. I know that everyone had security concerns over cookies when they arrived. But browsers are more careful in their implementations of them and it's generally agreed that they're the only way to transparantly add state to HTTP, so everyone took deep breaths and calmed down.

And what a testament to the design of HTTP, that something unforeseen could be added ontop in such a straight-forward way. An awesome design.

So, can we all stop bemoaning that HTTP is stateless? Very clever people have figured out how to transport state over HTTP, so let's just get on with using it and making great web applications.

No comments: