Java and .NET may be the staples of enterprise application development, but there's no doubt that the use of dynamic languages such as Python and PHP in the enterprise is exploding, albeit from a low base. There's a strong body of anecdotal evidence to back up this assertion, and job posting rates for these languages monitored by Indeed show that, while Java and .NET job vacancies have been largely static, Python and PHP job posting numbers are going through the roof.
What's driving enterprises to increasingly code in dynamic languages, and is it something you should be encouraging? Let's look at several key aspects of programming languages-scalability, performance, developer productivity and security-to see how Python stacks up to Java and .NET.
Productivity: Python Code Is Cleaner, But Does That Matter?
One argument is that dynamic languages let your developers be more productive, since they can get the same coding tasks done more quickly.
"Some people say that you can develop 10 times faster in dynamic languages like Python, and I think there is certainly some truth in that," says Jeff Hobbs, CTO at software vendor ActiveState. "Many companies are using dynamic languages for prototyping, because if you can prototype and test 10 times faster, that means you can make and throw away 10 prototypes in the time that it would take to build one prototype in Java or .NET."
James Governor, an analyst at RedMonk, says many of the company's enterprise customers use Python, largely because it's easy to use. "Dynamic languages have certainly stepped up to the plate in terms of productivity. They offer the ability to produce quick iterations [of an application] and a nice UI."
Analysis: Get More Productive IT Workers in Just 3 Steps
That said, Forrester analyst Mike Gaultieri wonders why Python, which is supposedly easier to use, hasn't been more widely adopted in the enterprise. In fact, Gaultieri says he believes many of the supposed benefits of dynamic languages are a myth.
"People say that you can do things in five lines of Python code that would take 35 lines in another language, but I think that that argument is completely bogus. It's not about how many lines of code you have to write, it's about how you design the code to get it to work," he says. "I don't think Python or PHP are the way forward at all."
Gaultieri says he would "certainly question" an enterprise that wanted to adopt Python so its developers could be more productive, adding, "There are not a lot of [Python] libraries for enterprises."
Slideshow: 11 Open Source Programming Tools on the Rise
This point is contentious, and Python developer Graham Dumpleton, a senior software engineer at Web application vendor New Relic, disagrees. "It's certainly true that Java and .NET have a large library of modules, and there won't be a one-to-one copy of each module in Python, but very often there will be something available that is up to the job."
"Alternatively," Dumpleton says, "you can wrap an existing library from another language in Python and make use of it like that." Finally, Python can integrate with existing environments with tools such as Jython (for Java) and IronPython (for .NET).
Performance: Enterprises Increasingly Trust Python
While dynamic languages have gained popularity, Governor rejects the notion that dynamic languages are in any way replacing more established enterprise languages. In fact, quite the reverse is true, he says; plenty of large consumer-facing Web businesses are moving from dynamic languages to Java.
"I'd say that Java is going through a bit of a resurgence at the moment. As Web shops grow up, they become Java shops," Governor says. Twitter was originally developed in Ruby on Rails, for example, but it has now been rewritten from scratch on Java platforms, largely for reasons of scalability.
News: Amazon Wants to Make Life Easier for Python Developers
One argument against dynamic languages is based on their performance limitations. Since they don't run as close to the processor as Java or C++, the argument goes, they simply can't offer an adequate level of speed. While that was certainly true in the past, today's multi-core processors are far more powerful, and as a result dynamic language performance is proving more than adequate for enterprises as varied as Google (with YouTube), Merrill Lynch, Cisco, VMware and Philips.
(In applications such as high-performance trading platforms, where speed is of the essence, it's certainly true that Python may not be as appropriate a choice as C or Java. However, these applications tend to be the exception rather than the rule.)
Open Source: Support, Tools Free, But You Get What You Pay For
At a time when IT departments face thin budgets and the pressure to produce more for less, the availability of open source development possibilities is bound to be attractive to many organizations.
"Cost savings are definitely relevant in companies where there is little budget available," Governor says. In any case, younger coders expect the open source tools that they are familiar be made available to them, he adds.
With open source programming languages, those things are free. The flip side, of course, is that support and a comprehensive array of tools may be more readily available for proprietary languages that are backed by a company as opposed to a community.
Security: Python, Other Dynamic Languages Typically Safer
Is there a good reason to choose (or avoid) dynamic languages on security grounds? Governor doesn't think so. "I'd be very surprised if anyone is claiming that .NET or Java are more secure than any other languages."
News: Java Developers Remain Bullish Despite Security Problems
It's also true that hundreds of Java vulnerabilities been discovered over the last few years-including a critical vulnerability announced in September that affected more than 1 billion Java SE 5, 6 and 7 users-while only a handful have been identified in Python.
There's also the argument made by security experts such as Bruce Schneier that a software monoculture-a scenario in which all software is created using the same single development language-make things easier for malicious hackers. Once a vulnerability in the development language is discovered, it can be exploited throughout the organization.
Python Catching On Because Developers Like Using It
While performance, productivity and security are all issues worth thinking about, considering the relative merits of dynamic languages vs. Java and .NET may turn out to be largely academic. That's because, like open source software in general, the adoption of Python and its ilk in the enterprise may be inevitable.
Report: Open Source Should Come First When Choosing New Enterprise IT, Report Says
"If you ask the CIO of many organizations what open source software they are using, plenty of them will tell you none at all, but if you look in the data center you'll see that all the data center tools are Linux, and you'll find the web servers are Apache," Governor says. "In many cases, it's not the CIO making the decisions, it's the developers making them."
In the same way, Python and other dynamic languages may be may slithering deep into the enterprise software stack, Dumpleton says. "Often developers use Python in the enterprise environment to do the glue, because it allows them to get the job done more quickly. It has snuck into these enterprises, and it is beginning to replace .NET or Java simply because developers like using it."
Paul Rubens is a technology journalist based in England. Contact him at firstname.lastname@example.org. Follow everything from CIO.com on Twitter @CIOonline, on Facebook, and on Google +.
Read more about development in CIO's Development Drilldown.
This story, "Python (and other dynamic languages) coming to the enterprise, like it or not" was originally published by CIO.