From PHP to Perl: What's hot, what's not in scripting languages

Scripting languages are the hot technology today for application and Web development -- no longer the backwater afterthought of the early days running in a pokey interpreter. Nor are scripting languages any longer merely the tool used for quick-and-dirty patching (someone once called Perl the duct tape of the Internet, and it stuck so well that Perl lovers wear the label proudly). No, today, scripting languages are popular for "real" programming work. In fact, entire systems and large-scale enterprise-grade projects are built from them.

To confuse matters more, many so-called compiled languages are now bundled with just-in-time compilers that make them as agile as scripting languages. First, Java got Java Server Pages, allowing programmers to tweak Web pages just like PHP and Cold Fusion programmers could. Lately Java programmers have been using Groovy, a language that's structurally integrated with Java and runs on the JVM. The main draw? It has more of a scripting language syntax.

[ Find out which 7 programming languages are on the rise and verse yourself in the 12 programming mistakes to avoid. | Keep up on key application development insights with the Fatal Exception blog and Developer World newsletter. ]

And so developers have lots of choices and much religious battle to wade through. To help you figure out where to place your scripting language bets, we surveyed programmers, commit logs, search engine traffic, and book sales data from O'Reilly. What follows is a barometer of scripting languages -- JavaScript, ActionScript, Perl, Python, Ruby, Scala, R, PHP, and Java -- with our best-guess forecast of which languages are rising and falling in scripting hipness.

Hot scripting language: JavaScript

Few scripting languages are as polarizing as JavaScript. But love it or hate it, it's hard to debate the fact that JavaScript has had a renaissance of late, making it the lingua franca of the client-side Web. JavaScript performance has exploded in recent years thanks to an arms race among browser vendors to build the fastest JavaScript engine, and the server side now has a powerful scripting tool in Node.js.

Thanks to its powerful libraries and the ongoing emphasis on JavaScript performance tuning among browser vendors, JavaScript is shedding a long-worn reputation as a lightweight tool for hack programmers. "The JavaScript renaissance is the redemption of what was once seen as a script-kiddie language," says Simon St. Laurent, senior editor at O'Reilly Books. "There really is a nice language hidden inside."

This is not to say that JavaScript does not have its share of detractors. "Aesthetically I just don't like JavaScript," says Mile Liles, a Baltimore programmer who tends to work either in Ruby on Rails or Java. "It's a personal thing."

Liles, however, acknowledges JavaScript's dominance on the Web and is intrigued by how you can use JavaScript without compromising aesthetic standards. In particular, he's drawn to CoffeeScript, a cleaner syntax that inserts the necessary curly brackets and compiles down to regular old JavaScript. In other words, it allows you to write JavaScript without getting your hands dirty with all of the JavaScript punctuation.

But CoffeeScript may prove even more powerful. St. Laurent, for one, sees projects such as CoffeeScript establishing JavaScript as the new JVM, a reference to how the Java virtual machine provided processor independence. CoffeeScript and other projects like Google Web Toolkit are converted into JavaScript in a similar way that Java is converted into the bytecode that runs on a JVM.

This strength as a competitor to the JVM has helped JavaScript find a second career on the server, thanks to Node.js. Yes, the visionaries at Netscape tried to build JavaScript-driven servers from the start, but they didn't have slick just-in-time compilers.

Further fueling JavaScript's resurgence on the server is the fact that every browser vendor seems to have concocted its own superspeedy tool to run JavaScript faster than ever. These new engines are easily 10 to 20 times faster than the ones from just three or four years ago. The Node.js team took one of these engines, V8, and produced the stellar throughput that drew everyone's attention back to the server.

But JavaScript's bread and butter remains on the client, where developers are building powerful capabilities using elaborate JavaScript libraries that smooth out the differences between browsers. These ambitions have been made possible in large part by jQuery, which is now so ubiquitous and stable that many people might be said to be programming in jQuery not JavaScript.

This vector is also giving JavaScript an increasing role in smartphone programming. While many developers who need very responsive interfaces swear by native code, a number of people with simpler, less performance-dependent requirements are turning to JavaScript frameworks such as Sencha or jQuery Mobile. This code can be hosted on a Web server or be bundled into an application using the open source project PhoneGap.

All of this interest is immediately apparent in O'Reilly's book sales charts, with JavaScript accounting for 57 percent of scripting-language-related book sales, up from 42 percent in 2009. It was also one of the few computer languages to sell more books in 2010 than 2009, bucking the economic downturn.

But not everything is perfect. Programmers gossip that the JavaScript committee is frozen by an inability to change the established infrastructure. And the stakes have become so high that battles will inevitably hobble the effort to create the next edition of JavaScript -- ironically code-named "Harmony." Google is reportedly working in parallel on a new language called either Dash or Dart that will fix all of the problems with using JavaScript for big projects like Gmail. Yet for all of these flaws, it's more omnipresent than ever.

Not-hot scripting language: ActionScript

If sales of O'Reilly scripting language books are any indication, the rise of JavaScript has claimed one clear victim: ActionScript.

Created by Adobe to help juggle sprites in Flash and Flex, ActionScript rose to 31 percent of O'Reilly book sales among scripting languages in 2009. While language experts note that ActionScript is a superset of ECMAScript, the official name of JavaScript, the two dialects are not interchangeable. In 2009, everyone wanted to build sophisticated games and other slick presentations with the language.

That was then. Now, ActionScript accounts for 17 percent of the scripting language marketplace at O'Reilly Books, while plain old JavaScript is booming. What happened? In two buzzwords: HTML5 and iPhone.

The first, HTML5, relies on JavaScript to move things around on the page; because of this, programmers are getting better at using browser-based JavaScript to catch up with what Flash programmers used to do. Sprites and animations that were once the main advantage of ActionScript are relatively simple to set up in HTML5. Every convert to HTML5 is reading and writing JavaScript, not ActionScript.

The iPhone remains a challenge for Adobe and ActionScript lovers. Apple's long resistance to the platform means that ActionScript authors can't write ActionScript and expect it to work in the iPhone's browser. Of course, that doesn't mean the platform is completely closed. The clever programmers at Adobe built a "packager" that turns the ActionScript in Flex and AIR bundles into something that runs in a native app.

Will this be enough? A startup called Ansca also makes Corona, a framework for building iPhone apps that uses Lua, a language the company promotes as being very close to ActionScript. The ideas live on even if they're not called exactly the same name.

Not-hot scripting language: Perl

This former giant laid the foundation of some of the best sites on the Web -- one of several accomplishments that earned Perl its worthy comparison to duct tape. Slashdot, the trendsetting blog, was coded in Perl more than 14 years ago. As the website grew, and stayed up, people began to realize that C++ was not the only way to write fast code.

But a decade is a long time for any scripting language, and there are vastly different personalities in the Internet development game now. Perl is hobbled by its cryptic syntax, causing many to call it the assembly code of the '90s. One Slashdot insider confirmed that the code base is still written in Perl before pausing and adding, "And AJAX." Many of the new features run in the browser using JavaScript.

There are numerous practical indicators of Perl's fading from its heyday, but one of the most prominent may have been the lack of success for MovableType. The tool was one of the first content management systems, but its first-mover enthusiasm didn't translate into a flood of plug-ins. Some might point to MovableType's architecture, but Perl should share some of the blame. Other CMSes, like WordPress, get 35 times as many searches on Google Trends. Is it any wonder why people are spending plenty of time on the forums asking how to embed PHP code inside a MovableType template?

The long downward trend is also found in searches for the language itself. The word "perl" may be one-tenth as trendy on Google as it was only eight years ago. (Search results are normalized according to worldwide traffic, so the rise in overall traffic exaggerates the dip.)

To make matters worse, it's harder and harder to find the latest State of the Onion talks online. In the early years, these discussions were touchstones for developers, with some enthusiasts reading them like dispatches from the Kremlin to decipher hidden indications about how the next version of Perl might behave. Others read them for the jokes, which Larry Wall, Perl's creator, includes in a way that is not very Kremlinesque. No one seems to have transcribed them, and furtive searches reveal little. To make matters worse, sites like Perl.org don't even seem to offer search.

Hot scripting language: Python

In a sense, the tipping point for Python came when the housing market crashed.

For those stuck trying to decode bond market prospectuses to figure out who got paid what when the bankruptcy dominoes were done falling, one thing became clear: English is a weaselly language, and some weaselly folks revel in its ambiguities to profit from complicated derivatives.

Enter one smart group that offered a compelling solution: Force every bond to come with a Python program that defined who got paid and when they were paid. While they may have been a bit too hopeful about the power of computer languages, the proposal spoke to Python's growing acceptance in the greater world of smart people who aren't computer geeks. Relatively easy to pick up, Python is becoming increasingly popular in economic research, science departments, and biology labs.

The popularity of Python has been noted by O'Reilly Books, which groups Python with top-selling languages like Java and C. Web searches like "python -monty" show healthy trend lines, and searches for the Python-based CMS "django -jazz" are rising, albeit not as fast as better-known tools such as Drupal or WordPress.

No doubt Python's appeal to the casual programmer is its lack of brackets. While many long-term programmers have grown used to letting the editor handle indentation, Python uses it to signify the beginning and end of blocks. Whatever the reason, it's easy to find Python lovers who prefer indentation over brackets.

Another indication of Python's influence is the popularity of CoffeeScript among JavaScript coders. The tool turns something that looks more like Python into something accepted by JavaScript engines. It's a way for those who are forced to write in JavaScript to enjoy the cleanliness of Python.

Lukewarm scripting language: Ruby

Yukihiro Matsumoto developed Ruby way back in 1995 because he wanted to do his system chores with objects instead of just strings. But the language that marries the structure of object-oriented programming with the quick and easy development cycle of scripting didn't really take off until 2004, when David Heinemeier Hansson added the Rails database access layer and produced Ruby on Rails.

These days, most Ruby development consists of website prototypes crafted with Ruby on Rails. Ruby without Rails is rare, but that dominance is starting to crack, thanks to Web frameworks like Sinatra, as well as Matsumoto's focus on flexibility and agility.

This agility is perhaps most evident in the Ruby Gems repository of open source modules. By December 2010, the Ruby community reported it was adding 18 new modules to Ruby Gems a day, a pace that meant it would surpass Perl's CPAN collection within weeks. The most popular modules continue to be ones like Rack for juggling HTTP requests and mime types, a tool for wrapping the data delivered over the Web with the right tag.

Ruby programmers have many of the latest platforms available to them. Heroku, for instance, is a leader in Ruby hosting, and many people continue to run Ruby wherever Java's JVM can operate through the magic of JRuby.

Ruby's syntax is remarkably clear of punctuation. The structure is simple and direct. The biggest strength may be the Rails framework's idea of coding by convention, a bundle of assumptions that saves the programmer a number of hassles like aligning objects with database tables. This idea has been adopted by Java programmers who used a Ruby-like dialect with the JVM to build Grails.

Hot scripting language: Scala

If its use by high-profile startups is any indication, then Scala is on the rise. Running on servers at Foursquare and Twitter, this functional language brings type-safety to the JVM, meaning it can run wherever the JVM works, including Android phones.

Scala is bound to attract more attention as people begin to unpack the lessons from Node.js. Much of the speed and success of Node.js are due to the way it brings a functional programming approach to a stripped-down processor.

That said, the book market suggests that Scala could remain a niche market. Only time will tell whether the general developer populace will follow their startups' Scala lead, but the language shows growth potential among the more experiment-minded set.

Hot scripting language: R

One of the more obscure languages to attract attention lately is R, a tool for compiling statistics. This shouldn't be surprising, given the increasing attention being paid to the terabytes of data sitting around on servers just waiting for someone to try to make some sense of the bits.

The language is a nice collection of classic scripting features borrowed from Lisp and mathematics, married to a large set of routines for statistical analysis. You suck the data into big matrices, then push the button; out comes linear fits, graphs, and other analyses.

The biggest news lately has been two parallel efforts to compile R instead of interpreting it. One, Rcpp, converts R into C++ and pushes the resulting code through a C++ compiler. The other compiles R into bytecode inside the interpreter. Both dramatically speed up the results.

My favorite detail is the way that some clever scientists have hacked R's routines into LaTeX so that you can start with raw data and build the final document. Some call it "reproducible research."

Hot scripting language: PHP

Judging by book sales, you would think that PHP's heyday was done, as PHP book sales dropped 25 percent from 2009 to 2010.

But a collapse in interest in learning the finer points of PHP is not the same thing as a collapse in PHP use. If anything, it seems to suggest that the platform is quite stable and there's no need to crack the books to learn something new.

The major Web platforms continue to be written in PHP, and if anything, their domination is growing. WordPress, Joomla, and Drupal still attract new developers, and they're all written in PHP. Django, an excellent Python-based framework, continues to lose ground against them in terms of Google Trends search frequency, with WordPress receiving seven times as many searches as Django (minus "jazz," of course, to reduce the effect of the framework's namesake, Django Reinhardt, on trending search results).

A quick scan of the PHP change logs reinforces this stability. There's a nice, reassuring stream of lines that begin "Fixed Bug" and just a few that begin with "Implemented Feature Request." What new features there are seem less aimed at developers and more at helping the server maintenance team with better dashboards and performance.

Newbie scripting language: Java

Scripting purists will look at Java, point to the existence of javac, and say it doesn't belong in the same pile as the simple-to-debug languages mentioned above. Perhaps that's true, but the Java ecosystem is changing, as more and more Java programmers have taken one look at the cool ideas from the scripting world and copied them.

Grabbing ideas, of course, is fair, and the Java world often improves them. Grails, for instance, offers much of the flexibility of a scripting language with the foundation of the JVM. Java Server Pages are so old that people forget them, but the standard server containers for Java all have the compiler built in.

I'm waiting, though, for the Java community to jump on the Node.js bandwagon and write their own unthreaded container that sits on the port and directs the messages to the right object. In the right hands, the performance could be amazing.

All of this strength may be why Java book sales continue to grow even faster than pure JavaScript, jumping from 11.5 percent to 13.9 percent of all computer books purchased from O'Reilly over the past year. Much of the latest interest seems to come from programmers building apps for the Android platform, which rests on Java's virtual machine.

More about: 2C, Adobe, Apple, Baltimore, C2, Google, Hewlett-Packard, HP, Oracle, O'Reilly, Reilly, Request DSL, Scala, Technology, Toolkit
References show all
Comments are now closed.
Related Coverage
Related Whitepapers
Latest Stories
Community Comments
Tags: Languages and standards, application development, software
ARN Directory | Distributors relevant to this article
Alloys , Aquion , Avnet Technology Solutions , Bluechip Infotech , Com1 International , Dicker Data , Dynamic Supplies , Express Data , ICT Distribution , Impact Systems Technology , Ingram Micro Australia , Leader Computers , Lynx Technologies , Multimedia Technology , Nextgen Distribution , Sektor , Synnex Australia , Topstar Computer International , Wholesale IT , XiT Distribution
ARN Directory | Vendors relevant to this article
HP , Oracle
Get exclusive access to ARN's news, research and invitation only events.
ARN Distributor Directory
ARN Vendor Directory
Microsites

iAsset is a channel management ecosystem that automates all major aspects of the entire sales,marketing and service process, including data tracking, integrated learning, knowledge management and product lifecycle management.

 

Latest News

Apr 17
EXCLUSIVE: Acer turns a corner with another big contract win in 2014
Apr 16
Sony launches 6in dual-SIM smartphone for sub-$500
Apr 17
Splunk exec defects to tech disruptor Elasticsearch
Apr 17
JCurve acquisition to boost telco play following $A2.5m capital raising
More News
24 Apr
The China Healthcare ICT Conference 2014
05 May
CeBIT Australia 2014
06 May
Oracle Day 2014 - Across 2 Cities
06 May
Oracle Day 2014 - Across 2 Cities
View all events