Write a Webserver in 100 Lines of Code or Less
Subject:   Perl's version
Date:   2004-11-19 17:36:48
From:   NeuralizR
Response to: Perl's version

It's really easy to say that perl's version is easier and simpler, that is until you look at the amount of code in HTTP::Daemon and HTTP::Status.

Now you're comparing an http server built on top of a socket library to an http server built from a library that essentially contains all of the code for an http server. With the library, you just need to instance the Daemon object and write up some way to handle your events.

So, if your point is that perl is easier because there's a lot of libraries already out there for you and you don't need to write your own.... you win.

I personally found this article very useful as an example of how to do a LOT of different things in REALBasic. :D Writing a web server is not something you would do in RB just for the sake of writing one, but it'd be useful to integrate that functionality into an existing application. It is also nice just to have a real world example of how to use sockets correctly in RB. This makes it easier for someone to implement any kind of event style networking code. ;)