Presentation
There was a revolution in programming languages that started when the Web, and consequently the wider Internet, became mainstream around 1994. Perhaps the revolution was so gradual, it happened over such a long period of time that few people noticed it.
Gradually, a few programming languages took over and became Internet linguas francas: PythonLanguage, PerlLanguage, RubyLanguage, PhpLanguage. CeeLanguage and CeePlusPlus are still used by some sites where efficiency and speed are critical (notably Infoseek and Google), but many Internet developers prefer languages that allow them faster development time.
What is the advantage of each of these programming languages for Internet applications? . What are its disadvantages? If this page has any value, it should relate specifically to Internet applications, not to general language issues.
This site aims to compare languages for server-side CGI.
C/C++ as an Internet language
Pros
- Speed and efficiency when large-scale computing is accomplished in a single HTTP transaction. (e.g., Google, Infoseek)
Cons
- Ease of writing code vulnerable to security attacks (particularly buffer overflows)
- Although the most common buffer overflows are easily avoided by modern programmers who know better than to use gets/strcpy etc. It's a shame that not too many of these "modern programmers" seem to exist :( Yeah...well...but also there's just a lot of legacy code that seems to only get fixed one security alert at a time. :-(
- It takes a lot of code & development time to get anything done in languages as low-level as this (in tradeoff for execution speed, sometimes) compared to some other options on this page.
Java as an Internet language
Pros
- Large commercial support base. Plenty of tools available, and manufacturers to go to for support
- Large marketing department pushing it as "The" language for enterprise development
- Application servers (J2EE, WebLogic) for scaleable web-based applications.
- Has a decent "sandbox" model to reduce leaking control.
Cons
- High execution overhead for CGI.
- Dedicated, large-footprint server for AppServer alternative
- API designed primarily for divided-labor large-org architects rather than smaller-project end-users.
- Lack of dynamic language features is not popular with many.
Perl as an Internet language
Pros
- Top-notch string processing. Most websites are simple text manipulation.
- Related to the above: numerous templating systems. Template Toolkit, Mason, various modules that deal with XML and XSLT and so on
- Absolutely huge collection of modules (TheCpan) that are easy to install
- Many scripts available for the download.
- Can be configured to execute within the server's process space, bypassing the CGI overhead.
Cons
- Cryptic syntax that's a mix of several language heritages: BourneShell, C and awk.
see
WhyLovePerl and
WhyHatePerl.
PHP as an Internet language
Pros
- Can be embedded in HTML; seen as a dedicated web language.
- Deceptively simple to learn.
- Touted as a good beginner language.
- Large array of built-in functions for everything from PDF creation to credit-card transactions to database interaction
- Available at a majority of hosting services
- Relatively good integration with apache.
Cons
- While the runtime services are good, the language itself is quite horrible
- Encourages writing bad code ^2 {too vague}'
- PHP implementation is full of bugs and might change semantics without a note, causing constant security upgrades that break your code
- What language doesn't have this problem (other than being so old that it doesn't need to change or used so rarely that hackers don't bother with it -- AKA "Mac syndrome".)
- PHP encourages writing web programs in an insecure manner
- Not too fast (good for building database interfaces, not making calculations)
See also
PhpProsAndCons
Python as an Internet language
Pros
- Clean, expressive
- Relatively good libraries for web development
- ZopeApplicationServer, which is a remarkably powerful web development environment, is natively Python-scripted
- Easiness of linking in C code when efficiency is needed
- Easy to find developers for (not as easy as for Java, but better than for Perl / Ruby)
Cons
- Too slow for some tasks
- sometimes hard to pick the right server integration technology (standalone server? CGI? Zope? mod_python?)
- Unusual syntax (white-space usage, etc.) frightens away some people used to C-style syntax.
Ruby as an Internet language
Pros
Cons
Server-Side JavaScript
Pros
- Most web developers familiar with language from client-side.
Cons
- Server-side standards not settled
CategoryProgrammingLanguageComparisons