The future & J2EE
There’s been plenty written about the future of Notes: Workplace, Websphere, J2EE being the way forward, etc., etc., etc. I’m not as curmudgeonly as others on the subject of Java (just kidding Andrew, I know you like it really), but it’s by no means the perfect language (you’re a fool if you think you can find such a thing). I follow a pragmatic school of thought that says find something, learn it, and make it work for you. That’s not to say I don’t have the odd whinge along the way, but of course J2EE != Java, and the former is a nasty beast at times.
From the general furore surrounding J2EE — particularly in Domino circles — it’s refreshing to read Charles Miller’s take on one particular aspect of the platform that drives him nuts:
It seems it’s impossible, these days, to write a decent-sized Java application without becoming reliant on fifty different library Jar files... On one hand, this is great. It’s great that Java has such a vibrant culture... It also makes for frustratingly fragile applications."
For many Domino developers starting out with Java, I think it’s amazingly difficult to build something rock-solid. We come from a world of RAD, which is remarkably forgiving, even if we don’t always think so. As a recent poster on the LDD said, “Does x = x+1 have to be this hard in Java?
”
Returning to Charles’ point, what to do? J2EE isn’t going away, and the current state of play so admirably encapsulated by his post is here to stay too.
So here’s my outlandish notion, as an arrogant newcomer full of piss and vinegar:
Code re-use is all well and good... it’s a definite plus-point for OOP, and I’ve spouted about it most fulsomely in an as yet-to-be-published — possibly never — article for e-Pro Magazine.
I believe in the concept passionately, yet it’s really one particular element of code re-use that I like to focus upon: take an idea, be it a single routine or whole application construct, and code it as elegantly and as (reasonably) loosely as possible. Whether you use someone else’s library or roll yer own is largely irrelevant, just so long as the application — and your approach to it as a coder — are not compromised unreasonably.
If your approach is to take one or two lovely ideas expressed well in an otherwise cumbersome open-source JAR file, then do it. Take the code, and bend it to your own nefarious will. If you’ve read about a nice-sounding pattern in a book, code to it.
Sure, you could scour the ’net for Yet Another Library to import, but I would argue that for 90% of these occasions, by the time you’ve found some code, tweaked the source formatting to your liking (be honest, you do this don’t you? Please say you do...), re-named some variables and removed some of the irrelevant stuff, you may as well have started from scratch with something of your own (OK, p’raps nicking a few ideas on the way).
What think ye? Am I evil beyond all hope of salvation? Or just a silly arse?
Update: Doh! Doing some surfing today, and what do I find? A good post about JAR file organisation and so forth courtesy of Richard Spence (AKA “Spuggy” I believe!) Look for the post entitled J2EE: Of packages and script libraries — his permalinks are broken. Link now works!
Posted at 22:58 GMT on 23 Nov 2003 | Categories:
| (8 comments)


As you say, the Domino developer has been spoiled - the code is wherever the application is.
I think you see the result of this fragility in the WAR/EAR bundles that get deployed on Tomcat/WebSphere et al. You just stuff the WAR with all the JARs you need, whether they are already in the server or not!
Don't even start on JAR versions.....
Truthfully, I've been rather impressed by the quality and stability of the jar files I have used. Most have come from the Jakarta project. Some others are: the Oswego Concurrent library, JCS object cache, Java Groups, and C3P0. I suppose I should also include the JBoss jar files and Hibernate.
i have been known (at least to myself) to just pop a few lines / ideas out of an open source jar. hey if it works, why not? i like the idea of just popping a few lines into a structure you are already in the middle of. on the other hand it is kinda cool to use a jar file too.
popping a few lines in feels like standard notes development, using a jar feels more like, hey, maybe i'm becoming one of those java geeks after all!
i think us notes geeks tend to approach this stuff basically the same way, or we develop similar strategies, or something. its interesting to read.
nice post btw, you have a way with words!
D'oh!
Seriously - never had a problem - even transiting dodgy domino code from Tomcat 3 to v4,1, then WebsFear v4 and v5..
The bit I do have pain with is the "Now, I'm sure there's something out there that will"... discovery process.
I suppose after _cough_ too many _cough_ years with Domino, I'm just used to knowing about 80% of stuff.. Instead of 5% in Websfear..
So - stop being a silly arse (only kidding) and just dive on in. You know it makes sense...
---* Bill
I even wonder how it is possible to have a global view of all this, new fundamental API or new version of old ones appear every day, with their new acronyms...
Look at websphere portal for ex, there is a new MAJOR version every 6 months, changing the API so much that you often need to redevelop themes, portlets etc...and in 1 year you 'll see plenty of customers locked with portal 4, with WAS 4, paying fortunes to IBM to migrate to WAS 6 and WPS 5.1 already planned 1H 2004 !
what's the point of all this...ah, maybe selling software and services...then the more complicated it is, the more the customer will require assistance, service, license...