Conclusions
Industry Heavyweights
As discussed in Commercial Usage, as a broad generalisation, big enterprises use JEE, medium businesses use ASP.NET, while smaller organisation and individuals tend to use PHP.
However, an examination of some of the Internet's busiest sites gives some surprising results.
- Yahoo!
- Yahoo! has grown from an early search engine into a huge portal, offering personalised services (such as email) and a wealth of information. Precise figures are not published, but Yahoo! is known to be one of the Internet's busiest sites, serving billions of requests each day.
Despite the vast scale of its operations, Yahoo! is also amongst the Internet's most reliable websites, with service outages and degradation virtually unknown. Which bullet-proof language powers this Behemoth? PHP.
- Google
- The first search engine to use intelligent algorithms, Google now serves most of the Internet's search requests.
Google Maps pioneered the cutting edge in web development, and their online applications are snapping at the heels of old rivals Yahoo! and Microsoft.
What is the power base of Google's Internet kingdom? Python, a scripting language occupying the same niche as Ruby.
- MySpace
- MySpace is a wildly popular social networking site, listed as the fifth most popular site on the Internet by Alexa.
Personalised with a variety of dynamic content, MySpace's servers must work hard, and their software must be of a high quality despite fast turnaround.
How do MySpace achieve this? The suffix on their web pages give their secret away. CFM stands for ColdFusion Markup, a language resembling simplified PHP, produced by Adobe.
- Twitter
- Another social networking service, Twitter implements an Observer pattern;
friends subscribe to a twitter's notifications, and the twitter publishes notifications of their current activities.
Which is the most appropriate platform for serving 600 requests per second?
Ruby on Rails.
- Yahoo! Store
- Also worth a mention is the original Yahoo! Store, formally Viaweb.
Paul Graham, one of Viaweb's founders, attributed its success to the use of Lisp.
Semantic Gap
An important quality of code is the clarity of intent. For example, consider two methods for reading a text file into a string:
- Java
-
FileInputStream file = new FileInputStream("filename");
byte[] buffer = new byte[file.available()];
file.read(buffer);
file.close();
String text = new String(buffer);
- C#
string text = File.ReadAllText("filename");
Amongst other advantages, it is immediately obvious what the C# code is intended to do, whereas understanding the intent of the Java code
requires executing it in the reader's head or recognising the pattern from past experience.
This is because one operation (read a text file) maps to one method (File.ReadAllText) in C#, which is the ideal semantic mapping.
In Java, five statements are required, of which only the shortest (file.read) actually corresponds to the desired operation.
JEE is notorious for requiring reams of complex code/XML
to acheive simple requirements. ASP.NET works well for simple applications, such as those built in MSDN articles and trade show demonstrations.
In more complex scenarios, such as real-word business requirements,
managing
the page lifecycle becomes the main focus of development effort. In contrast, the frameworks for dynamic languages tend to result in considerably
tighter mapping from intent to code. Dynamic languages do run slower than Java and C#, but as the companies running the busiest
Internet sites have discovered, the savings is programmer time are much greater than the expense in machine time.