I've seen some jobs around that revolve around converting Perl scripts to Java. What are the 开发者_如何学运维benefits of this?
I am not looking for job benefit reasons. I am trying to find out business\technical reasons they would have behind this. Is Java easier to maintain than Perl scripts?
In some regions, it seems to have become difficult to find new Perl developers. While this problem is mitigated, in my opinion, by the lower manpower needed for Perl maintenance (creo ignem...), businesspeople tend to get nervous when they get such a feeling.
Could be a variety of fairly legitimate reasons, e.g.
Java servlets run faster than Perl CGI scripts in some web server configurations (not necessarily all); I've done this before and it was definitely A Good Thing, we got a lot of performance improvement
Java may be seen as better suited to a team working with common object model, DAO classes, etc
there may be a desire to choose a technology which is known to work well with leading platforms like Spring, Hibernate, EHCache/Terracotta, JUnit
experienced Java devs may be easier to hire then experienced Perl devs
a project's size could be making Perl scripts seem unwieldy to work with
there may be an internal library of business domain JARs/classes which the company wants to reuse
Of course there may well also be a non-technical policy decision in play, e.g. a new management hire whose previous experience has led him/her to stick with their preferred technology.
A good reason would be prototyping.
Perl is an excellent prototyping language and so is much better for developing ideas and a working solution quickly. Once the "idea" is fully stress tested then it could be converted to Java for going live.
Another reason is probably programmers prefer to use Perl than Java :)
Here is a related blog post I read recently: Perl and Java in the Enterprise
It's really hard to guess why if one doesn't know what the Perl scripts were intended for, but speed, memory, readability and scalability may all have something to do with it.
The Debian Shootout is not a bad place to start if you want to know where each language's forte lies.
Perl scripts do tend to run slower than Java.
I've done some coding in Perl in the past for some pretty intense number-crunching applications. Upon hindsight, a faster language like Java or C would have been a much wiser choice.
精彩评论