Journal FortKnox's Journal: Perl vs. J2EE on the Web 13
After the CPAN April Fools joke, and the Taco troll, I went ahead and put in my two cents. And I was yelled at (read the reply), because Perl does what you want and Java is contained. Since it was a reply that sounded like a child, I proceeded to rip the low UID 1337 dude a new one.
Anyone care to MATURELY discuss the advantages/disadvantages to the different web languages in an enterprise website (high traffic site like slashdot)?
I have my opinions, but I like to hear others (as long as they are mature, of course).
Note: Yeah, the last journal entry was an April Fools joke. It'd be good if /. didn't completely ruin April Fools Day.
Addendum: That reply to my post above was a troll, and I bit like an idiot. I can't believe I was trolled... bah!
Anyone care to MATURELY discuss the advantages/disadvantages to the different web languages in an enterprise website (high traffic site like slashdot)?
I have my opinions, but I like to hear others (as long as they are mature, of course).
Note: Yeah, the last journal entry was an April Fools joke. It'd be good if
Addendum: That reply to my post above was a troll, and I bit like an idiot. I can't believe I was trolled... bah!
i've used both.... (Score:2)
Both are well suited for specific tasks in their own respect. Perl I have found to be very error prone because of loose typing, variable-length arguments to functions/methods, etc.
It truly depends on what one needs done and how big the job is. Need a server that can do 1000 queries/minute and scale to 10000 users, needs to last 50 years after it's written. Deadline for project is two years. J2EE on your choice of middleware (WebShere, Weblogic, etc) is the best option. Java as a language was designed to be maintained for those 50 years when change becomes necessary.
OTOH, need a program by the end of the week for doing the next few months of backups? Perl (or even sh/ksh/etc) is the better choice, because it was written for doing rapid development.
Need a routine in that massive server app that can parse a flat file database quickly? Use embedded Perl! get the parsing goodness of perl by compiling perl code into Java bytecode.
writing an OS? C/C++ are excellent choices.
It really comes down to what the task at hand is to decide what language is suitable for use.
(also, anyone who says Java is slow because of the bytecode and the VM should realize Perl does roughly the same thing when it compiles source to bytecode and executes it. And I agree that people are basing the "java is slow" on 1.1, and have refused to touch anything since.)
Re:i've used both.... (Score:2)
Now, on the other hand Java roxxors for some stuff. Take IBM servers like the eSeries, iSeries, whatever. Put websphere on them and they can do some amazing stuff with Java since IBM has already embraced java (and linux) while almost ignoring pearl. Which brings up a good point. If you are doing large scale database queries (on the order of 1000 a minute or so) you should really just use a ibm boxxen running DB2 (heck with oracle, DB2 is much better + better supported + cheaper) connected to a linux webserver. You use Java to run database queries/etc. Really, it is quite slick, just setting one up for online transactions.
Huh? (Score:2)
It's a shame that some of these stories are fake. AMD+nVidia would be good. A bit scary, but good for consumers. Wil Wheaton (Still am not sure if this is bogus or not.) on Trek... Well, I think it's good. He's a better actor. But jumping back into Trek might be bad for his career. Also, I thought Enterprise was trying to distance itself from Trek (witness lack of 'ST' in the title as well as the theme).
But CJAN? That would be pretty damned cool. Perl is just pretty screwed up. Or too much. Too powerful (yes, spoken by a non-programmer). Actually, the software I was thinking of coming up with, I'll probably do in Ruby. Community seems a lot more laid back than Perl, etc. (Actually, anything would do. I just stumbled upon several references to Ruby when I was thinking this thing up. Now it's just a matter of sitting down with it.)
The front page reminds me of David Letterman running a joke into the ground for weeks and weeks. Okay, haha. Enough.
Mostly, I've been watching my eBay auctions today while rerunning some ext3 journals.
Re:Huh? (Score:2)
Java is also tied to a corporation unlike Perl and Linux, so getting a community going is tough because the most we have for Java, IMO, are Sun's JDC webpages and the bugtraker. Granted, I havent done much of a search for a Java community, probably because they seem tough to find.
Perl's community is all over the Camel Book and other books, so that gives them some benefit. I dont see many Java books saying there's a community.
Maybe what's needed is a Java weblog site? A site that can also archive home-grown Java APIs the same way CPAN does for Perl. Do these already exist somewhere? Sun already makes current versions of API's available as exptension packs, but they're becoming more and more bundled with the SDK and JREs, making these move toward going obselete.
getting trolled.... (Score:2)
PHP (Score:1)
I've fallen in love with PHP. I have yet to learn Perl (it's on my to do list). I think Java is an okay language (but I prefer C++ to Java).
Just my two cents.
Perl vs. J2EE (Score:2)
As far as J2EE goes.. I haven't had a lot of experience on that level (I have to use MS tools where I work, including VB.NET and C#). I'm sure it is MUCH more appropriate for an enterprise tool, because that is what it is geared towards. Scripting languages are typically limited.. they aren't as reusable by other apps, they don't scale as well (aren't compiled), etc. I'm sure these arguments would also apply to PERL vs J2EE.
Re:java is a pile of dogshit (Score:1)
I'll tell you what, since I'm in a troll biting mood, and you try so hard to troll my journal, I'll bite, here.
First, I'm no CS major, and I didn't get introduced to Java until 2 years after I graduated. I'm a Computer Engineering major that has used COBOL, FORTRAN, PASCAL, LISP, C, C++, PERL, PYTHON and even 68xxx assembler, like you, along with VB, smalltalk, intel assembly, PHP, Cold Fusion, and others.
Leaving college I was a C++ man (always loved OO), but got a job using Perl. I tried OO perl, which was, as you mentioned, horribly disgusting. Perl for text analysis, though, was wonderful, and I used it happily.
Then I got a job with VB. Great for prototyping, but it "claims" to be OO (it has the keyword "class"), but you can't even encapsulate. My next job was in Java, and it impressed me away from C++ in a matter of minutes. It is so much easier to use, makes memory management nothing to worry about, and the error handling is a dream.
Mind you, if I needed to do anything that was processor and memory efficient, like an OS or low-level stuff, I'd use C++ or assembly, but for applications that don't depend on a specific number of clock cycles per second, I'd take java in a heartbeat.
Re:java is a pile of dogshit (Score:1)
Actually, if you want to go low level, everything is a pointer in java (except primatives, I think).
java.lang.Object is merely a void*
The only thing is Java is intelligent enough to figure if you are talking about the pointer or the reference in most cases.
I'll also agree that VB is a pile of crap, but its good for prototyping something up fast (unless you are a Linux user... you can just use glade).
A bunch of non-favorites: (Score:2)
Its the framework, not the language (Score:1)
At the language level, I don't think perl relly provides distinct functionality anymore - even its regex model has migrated over to other languages.
In a way though, the framework issue is sort of compelling - choose the syntactic sugar that you like, and address common functionality underneath. Sure, the framework imposes some limits on the cooler language syntaxes out there, but most of these (lisp, haskell) had been relegated to the fringe long ago in any case.