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 the Internet's busiest sites gives some surprising results. As ranked by Alexa, these are Google and Yahoo!. Both of these sites provide a multitude of popular Internet services, primarily search. Each handles a high proportion of the Internet's total traffic, serving billions of requests daily. How do they maintain operations at such a gargantuan scale? Yahoo! uses PHP, whilst Google prefers Python, a scripting language similar to Ruby. Why is this?
An important quality of code is the clarity of intent. For example, consider two methods for reading a text file into a string:
FileInputStream file = new FileInputStream("filename"); byte buffer = new byte[file.available()]; file.read(buffer); file.close(); String text = new String(buffer);
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 achieve 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.
Can a statically typed language achieve the productivity of its dynamic brethren? This is the question to which ASP.NET MVC would like to answer "yes". The conclusion of this study is that it can; time will tell whether this is indeed the case.