September 01, 2005
Java vs. Perl

There is a possability that part of the system I work on will go to Java. It's the "display layer" part of the system. Basically, the templating and customer facing stuff (JSP, most likely) while the rest of the system will stay Perl. Now, I'm not exactly close minded to bringing in new technologies and having a hybrid system if it makes sense to do. I know Perl isn't always the end-all be-all of e-commerce systems, and other technologies may have their place (aside PHP, I really don't like PHP.. and Cold Fusion).

I've had a few discussion with the person who thinks Java may be the thing to use for that layer of the system. His background his more of Java than Perl (which is somewhat new to him), so I'd figure there is a natural bias.. as there is with me. But, I have yet to hear of a concrete reason why Java would be better to use than Perl for this. Of course, we don't have any prototypes of something with Java and Perl to do benchmarks, yet. That sort of "proof is in the pudding" is very important to me. If Java were 2x faster, and used less system resources... then I'd think there is a benefit. If somehow Java is better for RAD (Rapid Application Development), then I'd think there is a benefit. But, I'm not sure how you could prove that anyways. The 'rapid' part really comes down to the programmers.

So, I've asked for reasons why Java would be better, not good, but better to use. I have yet to get a really good reason. Here is what I seem to get:

* It's more strict than Perl, so code will end up more clean and structured since you can better enforce things. I don't buy this one. First, I don't like a strict language.. I like a language to DWIM and DWIW. This was a reason for my early on hatred of PHP and Cold Fusion. I kept saying to myself "WHY CAN'T I DO XYZ?? ARGH!!" or "NO!! THAT'S NOT WHAT I WANTED!! ARGH!!" Plus, you can have ugly and unreadable code in ANY language. That all depends on the programmer(s) and the development process. If you have guidelines and peer reviews, code should mainly come out clean and maintainable (and documented.. gasp).

* There are more "tools" for Java. I'm a "vi(m)" guy. That's the only tool I use. I tweak it to do what I want for Perl, but, that's it. I don't use IDE's, I don't use anything fancy. I'm an old-school commandline text-based guy (I still use mutt for my email and vi(m) for all my editing). I figure the more tools there are for a language, the more difficult the language is to develop in in it's raw form. Are these tools a crutch for people? Take something like HTML for example. There was a time when we wrote HTML by hand, but now everyone and their dog uses FrontPage or Dreamweaver to write it. That's fine if it's just helping debug or fine tune, but not when you can't write HTML without it. Same thing here. There is a line where tools become a crutch. I can write Perl in vi(m), textpad, notepad, pico, emacs or any other plain text editor. The only other "tool" I may need is perltidy to make sure my personal style can be transformed into something others are good with. I have had Eclipse mentioned to me over and over. I did just find out it has a Perl plugin (EPIC) and I know the Eclipse folks want to add some native Perl support. So, that whole argument may go away. But, I'm not sure that "tools" is a reason to use a language over another.

I don't think there have been any other major reasons given to me. It ends up being a tit-for-tat thing. Why am I not trying to defend Perl in this? Well, the system is written in Perl already, and it's doing a fine job. It doesn't *need* to be replaced, altough some things can be re-written and re-architected within the process. I think it's more costly and risky to switch languages and move to a hybrid system, and there should be some good reasons to do so.

Has anyone had experience with both languages and has an opinion? Anyone worked for a company which moved from Java to Perl or Perl to Java? Would there be a benefit of Java over Perl in the display layer? (Speed aside, since benchmarks would be done)

Posted by Kevin at September 01, 2005 09:57 AM
Comments
Post a comment

Leave a comment