The Programming Republic of PerlThe simplest forms of interactive sites are built with CGI scripts, where CGI stands for Common Gateway Interface, as discussed in Part 1 of this article. Most CGI scripts are written in Perl, as demonstrated by a quick look at CGI Resources. The nice thing about Perl is that all providers using Unix systems, and many running Windows NT, support it.
So what is Perl anyway? For the full story, the Perl Home Page gives a wealth of explanation. It may be a little tough to learn though, if you have no prior programming experience, since it is a merger of C-type constructs (where C is the mid-level systems programming language on Unix systems), and Unix shell scripts. It derives a lot from the Unix heritage and way-of-thinking, though it is successfully ported to Windows systems as well.
With the Windows NT version of Perl, you can run Perl statements inside Active Server Pages (ASP's), where most people use Visual Basic. Under Unix systems, there is a module for the Apache web server that emulates the ASP way of doing things, and Embedded Perl which does something similar without having to learn the ASP Way. For an example of a site built using Embedded Perl and the PostgreSQL database, check out the Philippine ISP Directory. The down side to this is not many ISPs and web providers support Embedded Perl at the moment.
How do you go about learning Perl? There are a good number of Perl books published by O'Reilly and Associates, and the most common ones are distributed locally (in the Philippines) by Mutual Books. For non-programmers, Learning Perl is recommended, while Programming Perl is more appropriate for those used to other programming languages. If you prefer courses, there are local companies who teach Perl as part of e-application building courses.
What some say is the most compelling reason to program in Perl is CPAN, the Comprehensive Perl Archive Network. This is a download site for Perl modules, or pieces of free code written by others that you can integrate into your own programs. This is Perl's way of promoting code reuse, or recycling bits and pieces of programs for other to build upon.
Python: A Friendlier Language for Non-ProgrammersI sometimes agree with Perl critics that Perl code can look like "line noise", and that Perl is a write-only language (meaning: you can't figure out what other people wrote, or what you yourself wrote a few weeks after writing it). Perl's competitor in the ease-of-use department is Python, which was designed as a teaching language. Like Perl, Python has components to make building CGI scripts and e-applications easier.
The powerful Web publishing tool called Zope is partly written in Python and uses Python as your tool for building extensions if you need to write custom code. Zope can be used to build web applications even without writing code. A sample app is called Squishdot and it's written by Butch Landingin, a Pinoy in the US. Squishdot powers up TECHNOCRAT.NET which is an interesting discussion site run by Open Source guru Bruce Perens.
One thing going against Python in the Philippines is that it is not very popular. (I myself don't know anyone who programs in Python, and, I have trouble learning Python because of my Perl background - it's confusing). So, if you decide to learn it (and pick up the O'Reilly book, too), you might be in demand!
Steaming up the Server with JavaWeb builders are familiar with Java, but mostly as a tool for building client-side applets. These are are little pieces of program that are executed by the browser's Java Virtual Machine (JVM), (theoretically) unable to touch the real computer. These are often done to extend the site's functionality by doing things that normally cannot be done, like implementing chatrooms.
Server-side Java makes use of what are called servlets, which are programs that are also protected from the rest of the operating system. Instead of working with the client-side browser, they work with the web server, taking in requests and processing them.
The original Java-capable web server was made by Sun Microsystems (naturally, since they invented Java). Now, there is a freely available implementation maintained by the Apache Project. Combine this with free Java compilers, interpreters, and library implementations, and you have a steaming recipe for success.
What's going for you here if you take the Java route is that there are a whole lot of locally available books and reference material on writing Java. Even if these cover applet writing, you get to know the language and you can pick up the rest from the online references. Java is even taught as an academic course now (like in my alma mater, Ateneo de Manila University). Finally, one Filipino-run site powered by Java Server Pages is the Unofficial Mapua Institute of Technology Alumni Home Page maintained by Jeff Gutierrez.
These are some of the top languages used by e-service builders using Open Source tools. Some I skipped are Tcl (Tool Control Language) (especially for those using AOLServer, and C and C++, for those who need to write higher-performance code.
Next we'll cover the server platform you'll use: operating system, and how to work with your service provider or local system administrator to get your work done.
WIRED! Philippines is a monthly online magazine published and hosted by KabayanCentral.com
Copyright 2000 KabayanCentral.com. All rights reserved.