Saturday, January 1, 2005

Four free power tools for your toolbox.

WEB DEVELOPER'S TOOLKIT

By Andrew Stuart

It doesn't matter if you're programming on the server side with Java, .NET, Lotus Domino, PHP, Python, or something else. If you're doing any sort of serious Web development, before too long you're going to hit problems in the area of browser and Web server interaction.

You know the sort of things that make life difficult--differences in the way browsers implement features, slow page load-time, bandwidth hogging on corporate intranets, clients failing to authenticate, international character sets displaying as junk, and XML files that are too large. Then there's proxy servers caching what they shouldn't and ignoring cache directives, JavaScript code updates not being picked up by browsers, browsers choosing to cache this but not that, and servers that don't compress with GZIP or deflate. Let's not forget servers that gasp under the load of your cool new software, and of course all of the common bugs that seem to creep into everything, from your code, to the code of the browser, and even the operating system.

It's a harsh world out there.

If you want to solve the tough problems, you can't be afraid of the underlying technology. Solving these problems isn't for the faint of heart. When the chips are down and the problems are tough, the fluffy "programmers" who only write HTML and CSS, and do server-side scripting, have to step back and let the heavy hitters do the work.

If you're that heavy hitter, you'll have to read the W3C (World Wide Web Consortium) specifications for the HTTP protocol. You'll have to spend hour upon hour Googling for the juicy details on how all these technologies work, down at a low level. You'll no longer have the protection of the Web browser to shield you from detail and make everything look nice and user-friendly.

When you hit these tough problems you're going to have to pop the hood and take a look at what's going on underneath the Web browser, on the network, and at the Web server. You're going to have to take a close look at the HTTP data passing back and forth between client and server. You're going to have to analyze the request headers to see what the client is asking for. You'll need to analyze the response headers to see what the server has sent back. You'll need to watch the conversation between the browser and the server, and measure the time between client request and server response.