Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Can Perl do anything Java can do?

by haukex (Archbishop)
on Jul 19, 2017 at 11:23 UTC ( [id://1195436]=note: print w/replies, xml ) Need Help??


in reply to Can Perl do anything Java can do?

Having worked with both Perl and Java, I can answer "yes, absolutely, Perl can" to all of those questions. The Comprehensive Perl Archive Network has plenty of modules to help.

However, since it sounds like you're asking about taking your software and team in two fundamentally different directions, I suspect you'll also have to take into account other questions like, what languages do the programmers on your team know? And if these are long-term projects, you should definitely investigate the two options further, i.e. try writing a program or two in each language to get a feel for the differences.

There are several Perl GUI APIs, see e.g. Perl GUI (2013). As for HTTP/app servers, many modern Perl web frameworks come with their own servers, but can also be integrated into powerful existing web servers like Apache. See e.g. UP-TO-DATE Comparison of CGI Alternatives.

Replies are listed 'Best First'.
Re^2: Can Perl do anything Java can do?
by shmem (Chancellor) on Jul 21, 2017 at 13:40 UTC
    Another thing I have been reading in some sites is that Perl is "slow" compared to Java??

    About 10 years ago, in order to fulfill the requirements for a for a final contract to be signed with a big company, the Java Witnesses coded a web interface to the ticket system living inside SAP (CATB). They coded for about two years trying to make everything generic, which led to a compressed source tarball of about 20MB. Signing day drew nigh, and a new requirement dropped in: they had to retrieve yet another datum from the vast SAP data table desert. Two weeks left, and they admitted, that they couldn't do it: too vast the sources and entanglements had grown, and they would have needed far more than two weeks to accomplish the task. I heard about that informally (i.e. gossip), and whipped up the whole crap on a sunday in merely 4 hours using SAP::Rfc (superseded by SAPNW::Rfc) in perl. On monday I presented my solution, which ran in no time compared to the Java solution, with just a fraction of memory footprint, was easily extendable and already did more than the Java bulk. Some bits of CSS fumbling, corrections here and there, and the stuff was up and running.

    So, faster in execution, in development, much easier to maintain and extend. Not that I earned much reward with that - see the parable of the two programmers. The task turned out to be quite easy.

    This again is anecdotal, I know, but also first class witness, and I know I am biased - heavily towards perl, by experience. Java folks tend to overcomplicate things (which leads to bloat, again ;-).

    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'

      I don't know if your reply was meant for me because you seem to be quoting this node? But I'll reply anyway:

      I dunno, my experiences with Java were not as bad. Whenever I hear "Java is slow and bloated", I wonder how much of that is hard evidence (if I had the time right now I'd run a benchmark or two), and how much of that is a stereotype originating from the days Java was first introduced and it was slow and bloated. Nowadays, with JIT and Java having many of its library functions implemented in native code (kind of like Perl's XS), I really do wonder how true that still is. Java isn't the fastest language of course, but sometimes I feel that the "Java is slow because it runs on a VM" complaint is roughly on the same level as "Perl is slow because it's interpreted". Adding that it's possible to write bad programs in any language, and that Java is in more widespread use than Perl, then there will unfortunately be a larger number of bad programs written in Java ;-)

      I don't mean to rip on your post in particular, I'm just giving my two cents because I'm seeing the "Java is slow" meme in several posts in this thread.

Re^2: Can Perl do anything Java can do?
by MikeBraga (Initiate) on Jul 21, 2017 at 12:35 UTC
    Back story: Our previous project in Java failed. We have 2 Perl developers who know Perl. I am the Software Manager. We are not fond of Java since it has dozens of frameworks and is too bulky.

    I am doing my research on Perl. The 2 Perl developers CAN teach Perl to our Java devs. But I need some independent information. That is what I am doing here.

    Some more questions I have:

    (a.) Another thing I have been reading in some sites is that Perl is "slow" compared to Java?? What is the truth behind this?

    (b.) Can you create web-services in Perl?

    (c.) Can Perl communicate with an Oracle DB? We use Oracle 11g and 12c as our DB.

    (d.) Can Perl create a daemon that runs on the background, monitors a directory and FTP files that are dropped to the directory? We need to create an app like this.

    (e.) Is it possible to create a Windows or Web applications that can have an icon in the Windows System Tray. We click the icon and the application will open.

    (f.) Is Perl free and Open source?

    (g.) How many "frameworks" does Perl have?

      Another thing I have been reading in some sites is that Perl is "slow" compared to Java??

      Which sites? How did they determine this? It certainly doesn't reflect my anecdotal experience which is the complete opposite.

      Can you create web-services in Perl?

      Yes

      Can Perl communicate with an Oracle DB?

      Yes

      Can Perl create a daemon that runs on the background, monitors a directory and FTP files that are dropped to the directory?

      And a lot more besides.

      Is it possible to create a Windows or Web applications that can have an icon in the Windows System Tray.

      No idea. I wouldn't use that OS if you paid me.

      Is Perl free and Open source?

      I think you would benefit from reading the FAQ. eg: Who supports Perl? Who develops it? Why is it free? and How does Perl compare with other languages like Java, Python, REXX, Scheme, or Tcl?.

      How many "frameworks" does Perl have?

      Plenty. The number changes all the time.

      • a. Have your perl & java guys solve the same problem. benchmark the results, performance and consider the time it took to code it.
      • b. Yes. Mojolicious docuemntation has some nice examples.
      • c. Yes, DBI/DBD::Oracle.
      • d. Yes.
      • e. Web applications don't have system tray icons, they run behind web servers. Win32::SysTray.

      • f. Seriously? You can't look up https://perl.org or wikipedia?. Yes. Your research skills need some work.
      • g. what sort of frameworks?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1195436]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-16 07:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found