2.4 Servlet Spec Reviewed
Greg Wilkins writes "Core Developers Network have reviewed the good, the bad and the ugly of the 2.4 servlet specification being produced by JSR154
.
As well as introducing the new features, those that are missing in action are discussed. Also existing and newly added problems in the specification are presented."
I cannot believe I'm going to argue for Java....
Java's main strength was supposed to be platform independence. However, due to missteps by Sun and backstabbing by Microsoft, Java has been relegated to the back-end of a web page, running under Unix. In this client-server architecture, speed is crucial, and Javas bytecode doesn't cut it.
Although I would argue that Java's OO implementation is also it's main strength, but platform independence is also a big deal.
Microsoft's antics only really prevent Java Applets from becoming a much bigger thing than they are today. In any other client-side Java deployment you can be sure the JRE ships with the app, is installed on the client machine by the sys-admin (corporate environment) or the installer handles JRE installation for you.
If you truly believe that Java isn't platform independent, go look at any of the numerous Java Apps that have been written. Notice how they run on Windows, Mac, Linux and Solaris? That's not a typo. Here is one if you're too lazy to look yourself.
Native binaries are the only way to get the speed necessary in the post-.com days
This is also wrong. One need only look at the rapid proliferation of languages such as Perl, PHP, Python and (duh) Java as evidence. Asm/C/C++ have their uses - but to use them for everything should get you fired.
Fortunately, Linux is FREE (as in herpes and porn)and makes commodity hardware perform as well as enterprise offerings from Dell, Compaq, IBM, etc.
Linux is an operating system - Java is a programming language. What are you trying to compare? Funny thing is, the Linux and Windows JREs are usually ahead of the solaris JRE - because more java users use... well, Linux and Windows.
Furthermore, all major unices (AIX, SCO, *BSD, HPUX, Solaris, etc) include linux binary support, so linux binaries are more platform independent than Java is.
Wonderful - so your app will run on all these different flavors of UNIX... just slower. Where as the JRE was built for the OS and does not need the same kind of translation. On top of that, it can take advantage of OS features a Linux binary may not be able to.
Oh yeah - and Java runs on all those platforms plus Windows. So by sheer numbers Java is more platform independent.
I hate always being the one to laugh at things like this.
Java saves the user money at the cost of the developers being ridiculed by people on slashdot that praise PHP (which is generally slower) than Java Servlets (the topic of conversation).
Maybe you think websites should be written in C and linked directly to the kernel? That would be a hard arguement for the likes of you to argue.
Karma Clown
I can tell you from experience that Java's API is much more robust than perls for just about anything (even regular expressions are faster than perl). Java has JSP, taglibs, Struts, and Webwork whereas Perl has mod perl, and templates. All of the web scripting examples I gave with Java work well in a MVC architecture (which Perl and PHP only have templates for). So, from a maintenance and development perspective Java is pretty much superior (I know because I've used Perl, PHP, and JSP/Servlets). From a robustness perspective, for anything more than a database driven site, Java has been far more reliable and secure (I can't count the times that despite proper configuration of that perl form mail script, it has been used to spam. JavaMail API supports mime attachments, pop3 and imap with the same API, etc.). From a speed perspective, with the proper JVM (try JRocket, IBM, and SUN's because each web server will preform differently with each) and the proper servlet container (Jetty for free, or Resin for pay), the right database server/JDBC driver (you don't have a lot of options for the driver usually, but they matter more than you can imagine), you can out-do PHP and Perl without a doubt. From a scalability/reliability perspective, you can replicate session variables over a cluster (without hitting the DB, which means very much more scalable on a cluster) which means if a node on a properly configured Java system goes down, the end user will never even know, so I really can't think of a single other system that does this other than Java.
So, I, a developer, can tell you, without a doubt, that using perl or PHP for any application other than your home page is generally a bad idea. It's slower, less maintainable, doesn't scale as well, and is less secure than Java Servlets/JSP on average. You'll have a hard time fighting with numbers or playing with definitions in order to dispute that too. Believe me, because I've used PHP on Enterprise level projects, but only because it was better than ASP, and before I learned Servlets/JSP. I'm in the process right now of converting an application from Perl/C/C++/PHP to Java because it's is a mess to administer. C/C++ calls to the Win32 API are a nightmare because the documentation blatantly lies, and without having a windows client, we would be screwed from the start. Perl and it's DBI mess crashes so much that I had to write a bash script to keep it up (several versions of both the DBI and Perl and MySQL still will crash when you try to keep it up 24/7). PHP, being the best of the three, is being thrown away because once I actually had to learn Java to replace the others, I found that it's just superior to PHP for the kind of work I need it for (user editable web scripting).
I've researched it all from Delphi, C++Builder, VC++, VB, PHP, Perl, Lisp (and frineds), and Python before I started the project. I can tell you the problems you'll run into in each of them. Some of them absolutely have no purpose (VB, Delphi, C++Builder) but others are only suited for other tasks that don't grow beyond a simple program/application into a system of interconnected peices. You can't write a true 3 tier system in PHP, and there are good reasons you would want to. Java technologies include J2EE (a superclass of servlets) that gives you an enterprise application server that you don't have to write yourself. Python is the most promising with Zope, and I keep my eyes on it all the time, but just don't be so closed minded to think that Perl can do anything. It's not meant to, and there just aren't enough good and stable API's to work on a project so large that you need everything from Message Queueing and MIME Email to Serial Port IO and TAPI. Perl doesn't even have a Zope like entity. When Python gets Zope down right and starts expanding it's API's to support all the features I need, then I'll be reconsidering.
You're career could end quick if you fail to let the mentality that Perl/PHP is good enough for any job die. It's just not the true. You may be like
Karma Clown