Spanking J2EE - It ain't done yet!
It's been just over a year since I first started using J2EE. Oh...all that good stuff about separating presentation from business logic, automatic load balancing, clustering, hot updates, J2EE promised it all and man was I excited.
Sure wish I knew then what I know now, because J2EE is an awfully stinky way to develop software.
"How can you say that?", you ask?! With all the breathless PR flying around the press these days about the advantages of J2EE, how can I possibly be denouncing it? Fellow developers, (real developers...not the people who write all the impossibly simple little samples and tutorials and things real clients would never ask for) I emplore you; Join my new "He-Man-J2EE-Haters-Club" and let's let the Java world _really_ know what's up with J2EE. Because I'm a smart guy, and I can't be the only one who is woefully disappointed with this whole sad mess.
Some examples you ask? Surely...
1. WHY WAIT?
I'm going to venture this guess; Any time saved by the stratification and functional isolation enforced with the framework is eaten up waiting for apps to deploy and JSPs to compile. That is, if you "properly" implement a J2EE solution, you may save a few weeks during your beta cycle because your application is so spiffily designed, but your overall development schedule will still take the same amount of time because your developers spend SO MUCH TIME staring at their screens waiting for containers to deploy applications and compile JSPs.
Just for kicks, I noted how many redeploys I had to do over the course of one week and it averaged out to 44 per day. Being that a J2EE deploy on JBoss takes about 25 seconds on my machine, plus an average of a further 53 seconds waiting for JSPs to compile as I wade through the site to where I need to get, I spend 55 minutes a day waiting for JBoss to do it's thing. That's 4.5 hours a week (more than a half day!). That's UNACCEPTABLE.
2. Application Servers by Duncan Hines.
J2EE containers are flaky. That's right...flaky. JBoss is flaky and S1AS is (very) flaky. And if you tell me that WebLogic isn't flaky, I'm gonna need some serious convincing because the last thing I wanna do right now is learn yet ANOTHER one of these beasts.
On a recent project deploying on S1AS, I discovered a bug in the JavaMail system that absolutely prevented any JavaMail sessions from running at all. After one week of work, determining it was in fact Sun's bug and not mine, I was able to hack together a workaround whereby I call Runtime.exec() to execute a special command line program I wrote to send emails. Lemme tell you, it's FUN FUN FUN work escaping whitespace in a form inputted field so that it can be passed via command line.
Even more recently, I uncovered the infamous "linkage error" in JBoss (in version 3.0.4 and also version 3.2.0) that makes it impossible to re-deploy applications - you actually have to shut down and restart JBoss! Oh...and what's better, there's no definitive answer about what it is that causes this little gem! You remember re-deploying, right? Let's do a little more math. With that little bug in place, not only do I wait the 25 seconds for redeploy and 53 seconds to get to the page I want, I also wait an additional 2 minutes for JBoss to restart. That's 3.3 hours a day. That's 16.5 hours a week. 2 days a week. 2 days. Yep. Sitting there. Watching JBoss munch and swallow.
3. Oops, I forgot my jock!
Support. Since there is none, I won't mention it.
4. Write once, run nowhere!
Universality. Back in my first days of J2EE, I thought what everybody was working towards was a universal application descriptor, where you could take an ear file and just drop it into any old compliant container and VOILA - web app! Sounds good! Sounds very JAVA!
Sadly, this is not so. It isn't even CLOSE to so. I spent about a half day fiddling with Sun's conversion tool trying to port a JBoss application to S1AS before I discovered that it just plain doesn't work (and trust me, I have as little faith that it works porting ANYTHING to S1AS). Doing it by hand (which means wading through gallons of Sun documentation on THEIR deployment descriptor format and THIER application structure, not to mention finding and fixing all the fun little tidbits that break in the web presentation layer) took about a day.
There's no universality here, folks. This isn't playing nice...it's not even playing.
I could go on (and on) about this stuff. Like why should it be such a pain in the *** to get JavaMail running on *any* of these containers? Or why it's such a pain in the *** to simply point a container at a database instance that isn't Cloudscape or Hypersonic? Oh sure, I could keep complaining about the impossibly hairbrained config files and unit tests and JNDI naming conventions (which are, forgive the political incorrectness, retarded). But I won't. I'll simply pose a question...
How is this better? Than plain servlets? Than PHP? Than CGI? I should start doing web development in assembler...it can't take any longer than J2EE and it'll run faster than snot! Sure J2EE gives us clustering...but what good is clustering if there's no application to distribute? I have a feeling that J2EE is WAY better on paper than in practise, and if this horrible mess is how a great language like Java addresses web application development, I shudder to think what I'd find if I ever peeked into .NET.
Now of course I understand there are all kinds of other benefits which I'm ignoring...and I'm going to continue developing J2EE because, while I feel the architects of J2EE have taken only one single little baby step in the right direction, at least it's the right direction. I'm just sick of the reality that what is supposed to be SAVING me time and money is in fact COSTING me time and money (and sanity).
Maybe one day J2EE will actually exist in a functional and usable set of tools, but that time is way off there in the distance somewhere. It's certainly not in my neighbourhood.
Now...back to work...trying to figure out what it means when JBoss reports "Servlet exception in appLayout.jsp: Servlet Exception." to the web browser and absolutely NOTHING to the log.
Urge to kill rising...
- Joe

