1.5. The Server Side of Things
The purpose of this book is to explain how Ajax works, paying particularly close attention to the web browser; however, a web browser is only part of the equation. Even for the biggest client-side fan in the world, it is impossible to totally ignore the web server. A web browser without a web server is totally cut off, limited to little client-side tasks such as Fahrenheit-to-Celsius conversions or some equivalent. But add a web server to the mix, and all of a sudden there is an entire universe at your fingertips.
As with the choice of a web browser, the choice of a web server is a deeply personal experience. Requiring much thought as to the capabilities and features of each and every server available, it is also important to take into consideration knowledge and training before coming to a decision.
For these reasons and others, in large corporations, decisions like this are usually made by upper management. After exhausting research consisting of a round of golf and a 17-martini lunch, managers decide to use whatever their golfing buddy Bob is using and issue a decree. The fact that Bob thinks that a megabyte is what sharks do to swimmers never really comes up.
But maybe your manager doesn't know Bob, so the decision is up to you. The question comes down to, what is the middle tier going to be? The answer to this question is totally up to you. Open source or proprietary? Whether to use PHP, ASP, JSP, ASPX, or Ruby? The answer isn't as clear as you'd think. Feel like using PHP and Internet Information Server? Not a problem, just download and install PHP. If ASP .Net and Apache is your thing, try Mono. I'm not here to make the decision for you; regardless of the server side, Ajax will work on the client side.
First and foremost, Apache is not a web server developed by Native Americans; the name is, in fact, a pun. In the early days of the Apache Project, the server was patched nearly daily, leading someone to declare that it was "a patchy" server. Needless to say, the name stuck.
Things have changed quite a bit since those early days; Apache has been the most popular server since the latter half of the 1990s. At the time that I'm writing this, more than two-thirds of web servers use Apache, which says a lot about stability.
1.5.2. Internet Information Server
IIS, as it is known to those of us who use it, is Microsoft's answer to Apache. In fact, most of the examples in this book use IIS on the server side. Don't get excitedit isn't because it is better; it is only because it comes bundled with Windows XP Pro. It comes down to the whole Internet Explorer thing; I'm lazy, and I use it at my day job.
1.5.3. The Remaining Players
Yes, there are other web servers beyond the big two. For example, there is the CERN Server, brought to you by the same people who created the World Wide Web. Another choice is NCSA HTTPd, from the National Center for Supercomputing Applications at the University of Illinois in Urbana, Illinois. Unfortunately it is no longer under development, which is too bad; I, for one, would like a web server from HAL's hometown.
I'd like to mention another "minor" server: WEBrick. Technically considered an "HTTP server library" for creating web servers, it is included with downloads of the Ruby programming language. Note that the quotes are mine because it just isn't natural to be able to create a web server with only a few lines of code. WEBrick falls into the "tools to make tools" category, which I cover later.