JavaOne 2006, Thursday
Hoo boy, am I attending a lot of sessions on Enterprise Java Beans or what? This is my first time at the conference, so perhaps I’ve done things sub-optimally. All I know is that I’ve heard pretty well the same thing at every EJB talk I’ve been to: “Wow, look, we can do all that stuff that previously needed a good-sized novella worth of XML with annotations now! Except don’t use annotations for this big bunch of things over here. And probably not for production code, either….” I’m glad that Sun is working on making EJB simpler. Looking back, however, I don’t think I needed to go to quite so many talks on it. Perhaps next year they could just call them all “Same old EJB talk that you’ve already been to three times,” and I’d be able to more easily avoid this sort of thing. Anyway, this brings us to:
EJB development, “point and squish”
This was a talk about developing with the new and improved simplified programming model in EJB 3.0. Can you guess what they talked about? That’s right: all the things that you use to have to use XML for before that you can now either use annotations or somewhat less XML for now. Woo, exciting, party hats….
They did go over how class hierarchies would change in the new world order, down from an interface and an implementation and a magic class over here to do some sort of stuff to just an interface and an implementation. Which, I guess, is a good thing. They also covered some set of XML files that you need to have in all cases.
My big takeaway from all of the EJB talks is that I still probably want to avoid EJB if I can. There are almost certainly problems that EJB would be useful for, but I’d bet dollars to doughnuts that I can come up with a simple solution for most problems out there.
Best Practices: Data Access Strategies
Java “Enterprise Edition” version five has this whole huge new data access model. I was pretty sure that the talk would be about it. Not so much. The presented gave a freshman survey course overview of every data access method in the universe, covering everything from JDBC to every flavor of web services under the sun to HTML page scraping.
He spent a solid half of his time discussing “mashing up” Swing applications and web services. DJ Sun and DJ Java are really in to this sort of thing. They’ve got an admittedly cool Swing application that uses Flickr, Google maps and Yahoo maps to build a photo sharing application that you can use to tie photos to physical locations and show where they were taken on a map. It’s neat, but you have to download this huge freaking Swing application to use it, and you need to have some version or another of Java installed, and gee I bet you anything I could build the same thing on the web or with flash and have it work with no download at all. Anyway, I should also mention that they called Swing applications that use web services “smashups.” Get it? Swing + Mashup = Smashup! Very clever, Sun marketing!
One useful thing to come up in this talk was the fact that there’s a ResponseCache mechanism that can be pretty easily plugged in to Java’s URI fetching mechanisms. This is useful for sometimes-disconnected applications, and I can see it being useful for a couple things that I’m working on. Something to look in to at any rate.
Debugging across tiers
OK, this one sounded boring going in to it, but also like it might be very useful. I’m all for new debugging techniques, as is every developer, right? Well, the talk turned out to be some guy droning on in monotone about how to point and click your way using Sun’s NetBeans IDE to something something something oh god I can’t take this I’m leaving where’s the closest bar to the Moscone center?
The dojo talk with a clever name that I forgot
Dude from dojo and dude from Sun gave a brief but good overview of the popular Javascript application framework. Dojo seems a pretty good mix of useful event handling tools and UI widgets, and Alex Russell, the president of the dojo foundation, seemed pretty cool. There wasn’t any of the “dojo is the answer to every problem that anybody has ever had” vibe from him, which I always find refreshing. I’ll have to give it a look for the next GUI application I write.
After Alex introduced dojo, Sun guy got up and prattled on about how you can and indeed should use dojo with Java technologies. OK, fine. This is a Java conference and all. You do your thing.
I guess this sort of thinking has always given me an uneasy feeling about the Java community. There’s this attitude that Java is the one solution for all problems, which is absolutely ridiculous. Java is a solution for a great many problems, but it’s hardly the best for any number of them.
Sun pushing this line of thinking I can understand. It’s their product and it makes sense for them to want people to use it. Why anybody other than Sun would, however, is quite beyond me. Any company that adopts this line of thought is tying a big boat anchor to both its own feet and the feet of its developers’ sure to stagnate careers. Every problem isn’t a nail, so you need much much more than a hammer to get things done properly.
Maybe if there were more tools — languages in particular — that ran well on the JVM I would feel better about this Java-everywhere thinking. That I know of, there’s only Java that both runs very well and isn’t super super fringy. Jython is slow and a year behind its C counterpart. JRuby is, from what I’ve heard, similar. Even Groovy, built “for Java developers by Java developers” gets at most 1/10th to 1/5th of the performance of Java. Microsoft is really eating Sun’s lunch with the CLR in this respect. They’ve got C++, C# and VB running exceptionally well. They’ve hired on people to work on a CLR version of Python, that, while behind the curve in terms of language features, performs at least as well as the native version. There’s no reason that the JVM couldn’t have the same breadth of tools available. That it doesn’t is a shame and keeps me from taking it very seriously as a platform. (Robert told me that Sun is planning on offering more languages that target the JVM for Java v. 6 or 7, which would be very, very cool. I hope it happens.)
Ajax Smack-down
I was so sick of EJB at this point that I ditched my last scheduled session and sat in the overflow room for this one. The basic idea here was that they got a couple of Ajax guys — leads from the DWR and dojo projects — in a room with a “technology evangelist” from Adobe’s Flash/Flex project, a lead from the “Java Server Faces” initiative, and a Java Swing developer.
There was all too much talk about “what’s better, Java or Javascript?” To which I say “who cares, they’re different.” End of story. But no, the thick client guys had to do their thing.
Flash dude went on and on about “flash can open sockets to arbitrary computers.” Nobody said “that’s cute, but Javascript can’t for security purposes, not because of any inherent language limitation.” Oh well.
The Javascript folk seemed to have the attitude of “look, use our shit if you want to. We do and we like it,” while the Sun folk had very much of a “ooh, Javascript might be bad. Why don’t you stay over here in thick client land where it’s safe?” thing going on.
Whatever. Use the right tool for the job. Maybe it’s Java and maybe it isn’t. Don’t let religion get in the way of your software and everything will work out just fine.