Wednesday, May 23, 2007

JavaOne Time Warp

Last year I turned up at the Moscone Center, registered, headed down the escalator, saw brightly colored bean bags and a big screen with images of Gosling and advertisements for Java. I went to the first general session and watched as they spoke of Java on mobile phones and the open sourcing of the JVM.

This year I turned up at the Moscone Center, registered, headed down the escalator, saw the brightly colored bean bags and a big screen with images of Gosling and advertisements for Java. I went to the first general session and watched as they spoke of Java on mobile phones and the open sourcing of the JVM.

I started to panic. Had I just broken the space time continuum and gone back in time. Would I bump into myself and melt away like the guy in Time Cop. I started to sweat as I walked around the conference looking for signs that I was wrong and all would be OK.

Finally I found something that set my mind at rest. The back packs weren't orange - THEY WERE GREY!!!

I was now safe in the knowledge that I hadn't ripped the fabric of space time. But wait. I'd just paid, well my company had just paid, over 1500 bucks for this. Surely there would be something different apart from the color of my back pack. Then I found it! The end of the EJB specification had become .1.

Was that it, .1 for $1500. Well no, the stands in the pavilion had moved around. Now I knew my money was well spent.

Friday, May 11, 2007

Java Closures : Lipstick on the pig a distinct possibility

Google Fellow Neal Gafter talked lots of sense on the subject of Closures during his JavaOne session. Closures are immensely practical for terse Java - another lesson that Ruby is teaching Java. Imagine never having to write an anonymous inner class just to listen for an event in a Swing application! The design he presented is very well thought out, with practical examples showing how code can be dramatically improved by this simple concept.

The proposed JSR, which to me seems to be a no-brainer for inclusion in a future Java SE release, is well thought out and documented. Sun, obviously, will dilute and devalue the product via the well known pattern "death by committee". Half-wits will xxx and yyy until zzz and we be left with qqq.

The simple fact is that anything of value which is invented outside of Sun (in fact, these days, everything if value is invented outside of Sun) is usually placed in someone's inbox while the Sun developers scramble to produce something that they deem to be better. The Sun product is then released with some explanation of how the original proposal "would not fit into Java's backwards compatibility requirements" or "is too difficult to implement" - despite the fact that the inventors have already implemented and tested it. Basically instead of a shining example of innovation and ingenuity, we're more than likely to get a pig - albeit wearing lipstick to improve the appearance.

EJB 3.1 - The Polished Turd Edition

So Sun are working on yet another revision of their EJB specification - oh joy. I'm not really sure how shiny they can make this turd by continually trying to polish it, but it's quite obvious that while they've been spraying the Pledge and rubbing the duster that they've had plugs rammed tightly into their ears.

Last year when they released Java EE 5, including the EJB 3.0 specification, they almost did something right. They removed Entity Beans from the specification, but forgot to drop the rest of the crap along with it.

The problem is that there are still some that think that Java EE are good specifications, and there are even some that actually believe they're Sun products rather than uncomfortable toilet paper. Why is this? Well that's really for another rant, but the short version is that certain popular publications won't publish anything that criticizes Sun due to the fact that they get a ton of advertising revenue from them. So unfortunately many people in the Java community remain uneducated.

Sun don't listen to the community. They give lip service - but I can get better lip service for $5 by going to certain street corners in Tijuana. Last year they had the perfect opportunity to say "We were wrong, Java EE isn't working and there's much better solutions out there like Spring etc." But they didn't and instead produced another blot on the Java landscape in the form of Java EE 5 specifications.

The arrogance of Sun can be seen throughout Java's history. Take logging - when they introduced logging to Java 1.4 SE they had the chance to go with the community and use Commons Logging and Log4J. But no, Sun knew better, they produced their own logging solution that resembled the kind of log you see flushing down the toilet bowl on its way to the Atlantic ocean.

In Java EE 5 they had the opportunity to replace entity beans with something like Hibernate - which was being used by thousands of developers who were smart enough to avoid EJBs. Again they missed the point and produced another API and expected the world to refactor their code to use their API instead of Hibernate.

So what now. Well Java 6 SE is out, so we're now expected to wait with baited breath for Java EE 6. And everyone knows that Java EE 6 will contain the shiniest turd the world has ever seen in the form of EJB 3.1.

Now I'm not saying that EJB 3.1 won't be an improvement over EJB 3.0, but then George Bush Jr was thought to be an improvement on George Bush Sr. Even with these improvements the spec won't be finished for some months and Sun will expect everyone to wait for it rather than use other frameworks that are already out there and do things so much better than EJBs ever could.

The biggest problem is that the community (the people that keep Sun in business), particularly the superstars of Java, don't speak up enough or don't do it in a collective way. So Sun drowns out their voices with a 20 foot screen at JavaOne with Gosling and Schwartz spouting the Sun propaganda.

This has led to some of the greatest minds in Java moving to other languages like Ruby, which will result in less and less innovation in Java. Possibly this is what Sun wants as it will give them full control, but it's not something I or the millions of Java developers want.

So what I would like to see is the rock stars of the Java community getting together as one voice and saying that we don't want any more turds - even if the turd has been polished as much as EJB 3.1.