Sunday, May 06, 2007

Which server-side technology?

Since joining UIEvolution, I've been dabbling with webserver technologies. This is a huge switch for me, coming from a mostly embedded systems background where the only languages available have been Assembly, C, and C++, and the only technologies were those provided by the hardware makers or self-written.

When the choices are limited, the boundaries are well-defined and it's easy to focus on the problem at hand. But with servers, there are so many choices that I don't know which direction to go. I started, I suppose as everyone does, with Apache. I'm running on an emulated Debian machine via Microsoft's Virtual PC software. Debian is really nice with their packaging, so Apache automatically came with PHP. It just worked right out of the box (or out of the apt-get, so to speak).

But then I wondered what else was out there. My experience with Perl gave me the bright idea to get Perl CGI working on the Apache server. After a bit of hassle, I finally figured out how to get the scripts to run correctly. Unfortunately, I can't figure out how to get CPAN to work properly, so my scripts have to run without modules. That kind of sucks. Seeing the ease with which PHP is molded to Apache, I figured there had to be a better way. Perl, despite its goodness, just wasn't going to work out for me.

But what, then? There are two obvious roads that this question leads down. The first is to stick with CGI (Perl, PHP, Python, Ruby) or to get acquainted with Sun and Java (JSP). Seeing as how I had already messed around with Apache and was pretty fed up with dealing with script locations and file permissions, I installed Tomcat, the Apache foundation's Java Servlet web server software.

First thing you notice after apt-getting tomcat5, it doesn't work. Without the Java JDK, you can't do anything with Tomcat. There are no nice apt packages for Java, so the solution was to download the self-extracting JDK from Sun and install that. This requires updating the /etc/profile file to define and export the JAVA_HOME environment variable. Log out, log in, voila the envvar is now set. Tomcat works! Hooray!

Now what? Um... Struts? Inline coding? And hey, did PHP stop working? No, it just doesn't work with Tomcat.

I went to Google with my question. Apparently there are more technologies than problem spaces. Every technology has its adherents, but nothing seems welcoming. Ruby seems to be generating a lot of excitement. Perl seems to be collapsing under the weight of the next version. Python seems to have gone into hibernation. JSP doesn't seem to be anyone's cup of tea. And PHP gives my Perlish brain seizures with its haphazard API. It's all a big mess of technologies, but without any particular one being any better than other ones.

For the time being, I'll be focusing on JSP since the UIE server-side components are written for JSP and come with some special tags and other niceties that aren't immediately available in other languages. But my question is looking more towards the future (my future). Where is server technology heading? What are the technologies that are in use now telling us about what sorts of technologies we'll be using in the future? What should I study now as to put myself on the front face of the technological wave?

I just got a message from a friend. He suggests C#.

0 Comments:

Post a Comment

<< Home