in reply to Perl and Java

Having worked with both Perl and Java on multiple platforms (although not for heavy graphics stuff), I'd say their portability is about the same. As corion said, it's possible to write both portable and non-portable programs in both languages.

One of the benefits of Java is having some money behind it. I'm serious. I work with with databases a lot so I can use JDBC and DBI to compare. DBI is faster (much faster in some cases) and simpler to use. But JDBC offers much richer access to metadata which can be extremely important for portability. IMO, a big reason for this is Sun's muscle -- probably a bigger reason is the wider market for JDBC drivers, but that just illustrates the point.

The companies and money behind Java also enable the various working groups to come out with some (again, IMO) really thoughtful APIs. For instance, JMS (Java Message Service) is just an interface but since vendors want to have a Java interface and they want to be 'compliant' (however that's defined), then they'll typically implement most or all of the interface. For a developer, this kicks ass. It's like all the good parts about developing for Windows without being (necessarily) constrained to a single vendor. Yes, Sun is kind of that "single vendor" but the things I've been working with (Servlets, J2EE, JMS, JDBC) they've really seemed to work with industry and the folks who are using the technology to make things easier.

If something like this existed for Perl I'd be in nirvana. :-) As it is, developing with Java is generally more of a pain than developing with Perl -- the easy things in Java aren't always easy.

Chris
M-x auto-bs-mode

Replies are listed 'Best First'.
Re: Re: Perl and Java
by lauragarcia (Acolyte) on May 05, 2001 at 04:55 UTC
    After having read through two of these long discussion threads -- and very interesting they are! -- I find that there is one aspect of the comparison that has hardly been touched on at all: the database interface capabilities of the two systems. Java can use only interact with JDBC, as far as I can gather, whereas Perl can interact with Sybase, Oracle, mySQL/SQL, and one or two other database systems, correct? Wouldn't that make Perl much more useful than Java?

    laura.guimauve

      You're misunderstanding -- JDBC is (more or less) equivalent to the DBI in Perl. Both are middle layers which allow driver authors to write to a spec and application developers to write to the layer without worrying about the driver being used. There are caveats to that, of course :-) But if you're using general database capabilities both work quite well.

      Having used both, DBI is faster but JDBC has more metadata capabilities and is generally more featureful. It's also more difficult to use (like most things in Java) because you have to always be aware of datatypes, which Perl and DBI (and well-written drivers) make transparent for you.

      In addition, most (if not all) of the big databases have Type-4 (pure Java) drivers for JDBC. This means that you don't have to worry about client libraries, compiling, etc. across different platforms -- the same Type-4 Oracle JDBC driver will work on both Linux and Win32 with no modifications whatsoever. Very nice.

      Chris
      M-x auto-bs-mode