September 8, 1997
DR. WEBSITE: Picking a Language for Applications Within Forms
By David Fiedler and Scott Clark
Dear Dr. Website: We are working on an online application form for students who would like to enroll at our university for their master's degrees.
Our problem is that we need to do error-checking or form validation. We don't know if we
should use CGI or Java in this case. Another thing is that we will be putting all this
information into a database at the end. So with all this in mind, what do you think is best
for us to use?
Also, do you need an extensive knowledge of C to learn CGI? My friends and I are not
very proficient in the language. Finally, I have heard people say that it is better to use Perl
when using CGI. Is this true, or is it okay to use C? Is Perl easy to learn?
JavaScript is very capable of doing the job of form validation. If the students will have
access to a JavaScript-capable browser, then go with JavaScript. Otherwise, you can use
Perl. Perl is more than adequate to handle the job of most CGI programs, although there is
nothing stopping you from using C if that's what you'd prefer. Perl is portable, free,
updated often, and extensible with the use of modules. As for the learning curve, Perl is a
serious language and requires study and practice, like any other language. It can be fun,
useful, and productive to learn, and it is not going away anytime soon.
Remember, CGI simply means Common Gateway Interface. It's a standard way of letting
HTML pages work with programs. The CGI programs themselves can be written in almost
any language, but must reside in the cgi-bin directory at the root level of your Web server.
If you aren't the system administrator of your Web server, you may not have permission to
put programs in there. That's why Java and JavaScript are so popular, since they allow the
programs to reside in other directories or right in the HTML code itself. You do not need an
extensive knowledge of C to write CGI programs, although it may help if you have some
programming experience no matter what language you end up deciding to use.
As for databases, the answer to this question depends on the platform you are using. For a
small application such as the one you are talking about, Allaire Corp.'s Cold Fusion will
allow you to put the data directly from the Web page into the database. It is easy to program
and comes with many wizards to make it easy to set up your database. If you anticipate tens
of thousands of users each day, perhaps you would be better off going with a product such
as Bluestone's Sapphire/Web. Again, this is largely opinion, and there are many adequate
tools out there that will help you accomplish the task.
RELATED STORIES:
Webdeveloper.com's home page
Back to Home Page
Keywords:
html, development_tools
Date:
19970818