JavaOne 2007, DayTwo
Originally posted 2007-05-10 09:22:46
I haven’t seen an attendance figure for this year’s JavaOne, but it must approach a gazillion. The logistics of moving this many geeks from place to place would boggle my mind, if I weren’t so focused on preventing my death by trampling. The event coordinators allowed 20 minutes between technical sessions, but it doesn’t suffice to both empty and fill a room before the next speaker begins. Scores of black-clad ushers direct the mass of geekanity with varying levels of success, but the hallways and doorways impose limits that even they can’t overcome. To ensure proper classroom sizing and reduce disappointment, JavaOne requires attendees to sign up for sessions beforehand, and form two lines for each session: one for those who signed up and the other for those who didn’t. This seems to work well, but creates a doorway stranglehold as people have to scan their cards before entering. JavaOne has become crushingly popular, which bodes well for the continued popularity of Java.
As I navigate the nerd horde, I catch snippets of conversation: \”It’s just a wrapper around a wrapper around a wrapper!\” or \”Even non-dedicated connections have an uplink.\” This would be jock hell, a case of high school outcasts convening in strength. I think of the popular blond kid in Napoleon Dynamite, the one who shakes his head disgustedly while Napoleon signs \”The Rose,\” and imagine he’d give himself whiplash if he were here.
Sun offers multiple amenities to JavaOne attendees–SunRay stations to get on the Internet, meals and snacks, bean bags aplenty–but falls short on two essential counts: adequate wireless access and recharging power. Nearly everyone in attendance totes a laptop, but in many conference rooms the wireless signal is weak to non-existent, and speeds can be terribly slow. Also, few laptops have the juice to withstand the session schedules (the infrastructure group at my work gave me two extra batteries, so my four batteries last me through the day–thanks, Terry and Alan!). Consequently, folks huddle around the few electric outlets available like homeless people around an oil drum fire, trying to get enough power to make it through another session.
Speaking of homeless people, and not to be insensitive to the plight of others, San Francisco’s downtown teems with them. A stroll down the block makes you feel like a pinball bouncing bumper to bumper as panhandlers approach every few steps. Too-compassionate folks could go broke in a block. Though most either scrawl cardboard signs outlining their plight or ask directly for spare change, some get creative. We saw a street band rocking the block with drums, electric guitars, and wailing vocals. A Bart Connor wannabe stood motionless on his hands, the top of his head resting on a beer bottle. My favorite, though, was a fellow who pegged us for geeks and shouted, \”Java kicks @%#!\” That elicited a nervous laugh, but his follow-on plea was even better: \”What if I asked for change in binary? 1 . . . 0 . . . 1 . . . 1 . . . .\” I wonder if he’s a web-developing, tech bubble casualty.
The keynote session saw Thomas Kurian, SVP of Oracle Sever Technologies, outline four important technology trends:
- Java EE 5 (EJB 3, JSF)
- SOA and Event-Driven Architecture (EDA)
- Web 2.0
- Grid Computing
The next session, \”Creating Amazing Web Interfaces with Ajax,\” failed to excite me much. It focused on showing what was possible with Ajax, but any user of serious Web 2.0 applications has seen what’s possible. The presenter did list some tools and a website of interest: Prototype, Script.aculo.us, sIFR, soundmanager2, Firebug, and http://ajaxian.com. One note: the industry hasn’t yet decided whether it’s spelled \”AJAX\” or \”Ajax.\” The word started life as an acronym, but it’s time to drop the caps.
Josh Bloch’s session \”Effective Java Reloaded\” reminded me I’m not a developer anymore, and when I was I was never at his level. He continues to work on the sequel to Effective Java, and promised it this year sometime. In this session, he presented two tips about object creation, six on generics, and two miscellaneous tips:
Object Creation
- Static factories have new advantages over constructors in Java 5/6–they can do type inference
- Static factories and constructors share a problem when they have many optional parameters
Generics
- Avoid raw types in new code
- Use bounded wildcards to increase applicability of APIs
- Don’t confuse bounded wildcards with bounded type variables (Note: I confuse bounded wildcards with virtually everything else I don’t know anything about)
- Missed it
- Generics and arrays don’t mix. Prefer generics
- Cool Pattern: Typesafe Heterogeneous Container (THC)
Miscellaneous
- Use the @Override every time you want to override (prevents accidental overloading)
- final is the new private–use it everywhere you can except method parameters or local variables
I’m glad Google is in good hands.
The next session I attended covered the Google Web Toolkit (GWT), and I had to run right over to the bookstore afterward and purchase GWT in Action. I’d heard early version were buggy, and I hadn’t given this much thought, but the Google folks seem to have scored again. This looks impressive. I don’t yet understand how it integrates with JavaServer Faces, but I do understand that it does. The kit comprises two main components: a widget toolkit and a Java-to-JavaScript compiler. It enables you to code and debug your web apps in Java. Genius. One thing that stood out is that Google has a goal of a web page rendering in fewer than 300 ms. We’ve got some work to do back at the ranch.
I then went to a session on integrating JSF, Ajax, and Portlets, and it is indeed possible. Except for dedicated portals like Yahoo!, though, I’m not sure whether portals solve a need that most of us have. I’m sure we could shoehorn our app into the portal paradigm, but I think that would decrease usability. A solution looking for a problem.
The next session highlighted parallels between Java development and JavaScript development. It juxtaposed JUnit, which we use, with JSUnit, which we’re in the process of implementing. It talked about minifying and gzipping JavaScript to speed download times, as well as using CSS to clip images, so you can combine images into one download. GWT does this by default.
I ended my day with static code analysis tools. We currently use Enerjy CQ2, I believe in conjunction with Checkstyle. The presentation advocated using all the tools you have time to implement, as they overlap very little. The presenter divided static code analysis tools into two groups:
- Structure Tools
- Bug Finding Tools
The definition of \”bug finding\” stretches to things like best practice violations and deviations from coding standards. The tools mentioned were:
Structure Tools
- Java NCSS (Non-Commenting Source Statements)
- JDepend
- Dependency Finder
- Classycle
- Ivy
- XRadar–\”a metatool\”–puts together structure tools and bug finding tools
- Lattix: LDM ($)
- HeadwaySoftware: Structure 101 ($)
- Infotectonica: Juliet ($)
- Semantic Designs: DSM ($)
- IBM SAJ ($)
Bug Finding Tools
- FindBugs–the granddaddy
- PMD
- Checkstyle
- Eclipse TPTP
- NetBeans Jackpot
- JetBrains: IntelliJ IDEA ($)
- Programming Research: QA-J ($)
- KlocWork: K7 ($)
- SureLogic: JSure ($)
- Fortify Software: SCA ($)
A lot of information to absorb in a day!