Developer's Dilemma: PHP or Perl?

 Citing http://www.sci-tech-today.com/story.xhtml?story_id=32961:

In some ways, it is the scrappy contender versus the tested old-timer, as PHP and Perl duke it out to win developer attention. But more often, the two scripting languages get along just fine, thank you, and developers are glad to have both.

"I don't think you'll find many battles between PHP and Perl," said David Ascher, chief technologist at ActiveState, a developer of applied open-source programming tools that was recently acquired by Sophos. "It is true, though, that there are differences in terms of how they are used and what goals they meet."

The choice of scripting languages often depends on the scope of the project, personal choice on the part of the developer and what is being embraced in a certain corporate environment.

Picking and Choosing

Perl has been around the longest, and because it was not developed for the Web, it was very big, bulky and slow when it first appeared on the scene, according to Keith Greaves, CompTIA manager of Web and electronic initiatives.

Other languages like PHP, Python and Ruby were developed specifically for Web scripting, and proved to be faster. But Perl has made many improvements that have helped its Web usability.

"Since all these scripts are open source they're still being updated and therefore are gradually changing," said Greaves. "Just because Perl is the oldest doesn't necessarily mean it's irrelevant."

Personal Preference

Often, the matter of which language to use will come down to simple developer choice, based on their expertise and comfort level with a certain language.

"The argument about which flavor of scripting to use can be likened to the argument about which flavor of Linux to use," said Greaves. "It's really a matter of personal preference."

Although some argue that Java is the most secure, and therefore deserves to be a favorite, Greaves is not convinced this is the case. "The skill set of the developer must be considered," he said. "Any code can be made secure in the hands of a skilled developer."

Tools for the Job

Beyond personal preference, key issues that tend to drive a decision regarding language choice include time to market, scalability and flexibility, portability and speed.

"A lot of people who use these languages are pragmatic," said Ascher. "They'll use whatever's appropriate for the job."

PHP tends to be more successful in projects where dynamic Web sites are needed, he added. By contrast, Perl is used when there is more computational sophistication required.

"They have very different niches within the Web world," Ascher said.

Looking Ahead

In terms of future trends, Greaves noted that Ruby is a newer interpreted scripting language for quick and easy object-oriented programming.

Ruby has many features to process text files and do system-management tasks, as Perl does, Greaves added.

In the near-future, it is likely that the types of languages gaining dominance will be those that are associated with object-oriented programming, said Gartner Group analyst Thomas Murphy.

"You'll either create from scratch a service and publish or use those tools and languages to wrap legacy objects," he said. "With mainframe procedures, you can turn it into a service and consume those. That's all connected together with scripting languages."

Cup of Java

One major trend is the acceptance of more scripting choices, including PHP and Perl. In the past, there was an assumption that everything should be in Java.

As a result, many developers made Java the core language and system for a project, noted Murphy.

But now, picking a non-Java language is not as unusual as it once was, and developers do not have to justify their choices like they once did. "It's an interesting trend, similar to Linux," said Ascher.

"There was a time when the concept of open source was foreign to people, and now it's accepted," he added. "Similarly, people who thought everything should be done in Java are more open to different choices."

Slow and Steady

Although the programming world moves at a nice clip, in terms of scripting languages it has been progressing somewhat gradually. The choice of languages two years ago looks very similar to the choices today.

But with additions, developers have a wider array of picks, and more flexibility because of it.

"Things haven't changed too much in the last couple years," said Greaves. "There are just more choices out there now."

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值