View Single Post
Old Dec 19th, 2005, 1:33 AM   #5
lectricpharaoh
Caffeinated Neural Net
 
lectricpharaoh's Avatar
 
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,010
Rep Power: 5 lectricpharaoh will become famous soon enough
Quote:
Originally Posted by Terz
Hi all,
I'm just after a bit of advice on which language to learn.
I have a basic knowledge of HTML, and am looking to re-vamp my site with things like my own guestbook, a forum, and a few other bells and whistles.
I'm going to spend some time learning a language (e.g. php, asp, cgi, java, jscript, xml etc..) but would like your suggestions on the pros and cons of these.
At the moment I think PHP looks like the way to go. Any Ideas?
Cheers,
Mike
First and foremost, make sure you pick something that's supported on your web server of choice. There's no sense trying to add JSP servlets to your page if it only supports PHP, or whatever.

Second, as stated, CGI is an interface, not a language. The main downside to CGI is that it is (usually- it depends on how the server works) not as efficient as something like JSP for trivial tasks, since there is significant overhead with the creation and termination of threads (some servers reduce this performance hit by having a pool of idle tasks or using other such tactics). Thus, if you're using it for basic forms submission, etc, it is not going to be the ideal solution. If you're using it to do more in-depth tasks (say, dynamically create large images), it might be more efficient, depending on the language you use. The strength of CGI is you can leverage (yeah, industry buzzword) your skills in pretty much any language. Simply put, if your language of choice can read environment variables and write to standard output, you can write CGI programs in it. The server handles redirection of the output to the browser.

[edit] You should also read about the difference between 'server side' and 'client side' if you are unclear on this. Often, doing stuff server side is more sensible, because you a) aren't (as) dependant on script support from the browsers, b) less data needs to be sent to the client, and c) it's more secure. Of course, it also means more work for your server, which could become a problem with a popular site (but for a personal home page, it's likely a non-issue). [/edit]
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot.
- Vaarsuvius, Order of the Stick
lectricpharaoh is offline   Reply With Quote