Meaningless Drivel is fun!
The moose likes EJB and other Java EE Technologies and the fly likes Java vs. Perl questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Java vs. Perl questions" Watch "Java vs. Perl questions" New topic

Java vs. Perl questions

david chan
Ranch Hand

Joined: Jun 10, 2002
Posts: 46
I have been asked by manager to find out pros and cons of using Java and Perl for my state gov. working on. My dept. has a lot of mainframe/db2/AIX running. And they are planing to upgrade these system to web based one. Usually develop some web interface connect back to mainframe. So now comes to a point what lang. to use.

Can anyone give me some idea?
Pros Cons

Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
Is it specifically J2EE that you are interested in comparing against Perl?
Paul Done

Joined: Jan 03, 2003
Posts: 22
One of the sorts of questions which is probably going to get more opinions than facts. I've done some Perl CGI and J2EE development in the past - so here's my opinions...
J2EE Pros / Perl Cons
- Java is a more regimented and elegant programing language where with Perl there is always a '1000' different ways to do the same thing and Perl's syntax can often be a little obtuse. This means that for inexeperienced developers, Java is probably a safer language to use and easier to learn. This does NOT mean that you can't do certain things in Java which you can in Perl; Java now supports Regular Expressions in its standard API, for instance.
- If you are a fan of objected oriented development then Java is the better choise because it is completely object oriented. Perl can be used in an object oriented manner but OO is a lot less natural to it. This also helps if you are using something like UML in you design phase because your diagrams/models will be easier to map to Java constructs than Perl ones.
- J2EE has a very large standardised and rich set of enterprise APIs for accessing databases, Mail, legacy and enterprise information systems, message oriented middleware, and services such as server side security and transactions. Its possible to do a lot of this in Perl, but much of it is non-standardised.
- J2EE has a specific component model for server side programming (eg. servlets & JSPs, EJBs) which is targetted at providing presentation and business logic/integration services specifically.
- Another argument used to be that J2EE was more performant/scalable due to its multi-threaded support whereas typically a native O.S. process was spawned for every request to a Perl script on a web server. However I am not sure whether this is still an argument as things may have improved for Perl and its various Web Server plugins / integration modules since I last used it (Apache for instance).
- In my experience, there are more developers available for recruitment with good 'server-side' J2EE experience than good 'server-side' Perl experience.
Perl Pros / J2EE Cons
- You have to run J2EE applications in a J2EE compliant application server, where as most types of Web Servers out there provide support for Perl plugins. That said - it is possible to plug something like Tomcat into IIS.
- Perl is perhaps a bit easier to quickly put together simple dynamicically generated web pages - its maybe a little easier for prototyping your app.
Hope this helps
[ January 16, 2003: Message edited by: Paul Done ]
Paul Done

Joined: Jan 03, 2003
Posts: 22
Also see this topic which talks about accessing mainframes from J2EE....
Also, most J2EE app servers can run on AIX and all have access to DB2 via the JDBC API and DB2's database driver.
I agree. Here's the link:
subject: Java vs. Perl questions
It's not a secret anymore!