Skip navigation
ANNOUNCEMENT: community.oracle.com is currently Read only due to planned upgrade until 29-Sep-2020 9:30 AM Pacific Time. Any changes made during Read only mode will be lost and will need to be re-entered when the application is back read/write.

This is my last day as the intrepid reporter at Java One. The press room, which had become my home away from home, was closed. Instead of snarfing up the baked goods and looking for the secret stash of booze, I chatted with lots of interesting folks in the halls of Moscone, attended a couple of sessions, and pondered what it all meant.

The Toy Show

???The morning keynote was the traditional toy show, presented by James Gosling, with a show-and-tell of nifty Java software and even niftier hardware that is driven by Java, spanning the range from a meat scale with a Swing UI to an unmanned helicopter that takes spectacular terrain images. You can watch it here.

By the way, Sun is generously making the audio/video available at no charge to anyone. The general sessions are on the web now, and the technical presentations, including voice over, will be available in a couple of weeks. If you need access to the slides immediately, run

wget -r --user=Developer --password=JavaOne07 'http://www28.cplan.com/cc158/sessions_catalog.jsp?ilc=158-1&ilg=english&isort=&isort_type=&is=yes&icriteria1=+&icriteria2=+&icriteria7=&icriteria9=&icriteria8=&icriteria3='

on Ubuntu. (Elliotte Harold said it's --http-user and --http-passwordon Mac OS X. If you don't have either of these fine operating systems, use Cygwin.) Thanks to Neal Gafter for pointing out that my Groovy script can simply be replaced by the -r flag. (They say they'll turn the slide access off tonight, so either get it now or wait two weeks).

The Web Framework Shootout

I went to the session that promised a three-way comparison of Rails, Grails, and JSF+JPA with NetBeans. I had high hopes for this session when we picked it. (I was on the selection committee—the first time that Sun had outside people participate in the selection process.) Unfortunately, I was not all that impressed with the actual presentation. We all know that Rails and Grails produce a basic CRUD application, and NetBeans can do the same thing. After all, how hard can it be to query the database for tables and make a bunch of CRUD screens? And, more to the point, so what? My users don't want an app that can update a database table. Can I easily transmute that CRUD application into the application that I really want, with login, a menu to the side, navigation trails, etc. etc.? The presenter didn't address that issue at all. Instead, he gave some performance data for the CRUD application.

Afterwards, I had a long discussion with Pavel Buzek of NetBeans about the pain points of using JSF. Here is my list:

  • Not enough decent components. (Pavel says that NetBeans 6 has the Creatorcomponents, but I didn't see them in milestone 9.)
  • Touching too many files for mundane tasks such as navigation. (Pavel says that NetBeans 6 has the Creator navigation editor. That will help. Stupid me—I forgot to ask about message bundles.)
  • Unintuitive listeners for buttons and links in data tables. (That's the fault of JSF, not NetBeans, but maybe some tooling might paper it over.)
  • No standard for templating or theming (shame on JSF—this works beautifully on ASP.NET). Soapbox: I remember when I first learned about JSF at a Java One way, way back when. Amy Fowler presented the concept, and I asked whether we would get a tastefully designed widget set like in Swing. She said “of course”. But then Craig McClanahantook over as spec lead, and the focus changed. JSF still has the potential of becoming “Swing for the Web”, but there would need to be some serious attention to look/feel, not just framework.
  • And of course, the Stack Trace from Hell

Still, I see a lot of value in the components. I just can't get myself excited about loops that generate tr andtd tags, which seems to be the level of sophistication that I get in Rails, Grails, or Phobos.

Pavel pointed out that Rails developers swear by the incremental coding cycle. They bring up a basic app, add a feature, test it immediately, add another feature, test it, all without ever restarting the server. I was dubious—after all, how long can it take to restart the server? But then it hit me. It isn't the startup time of the server. It is the mouse clicks that it takes to get back to the point of testing. Log in, visit a bunch of screens until you get back to the screen that you are working on. Ok, I do hate doing that over and over. I am not quite sure what it means to incrementally change an app that has stuff stored in a working session, but maybe it'll work out ok in most cases. I noticed that I can actually change an app while I debug it, but I never tried that either because I didn't want to think too hard what that meant. I'll have to reconsider.

We talked about Creator and why programmers didn't embrace it in large numbers. I felt trapped into a particular coding style that makes it really hard to move your app into another environment. It isn't a bad style, but it is idiosyncratic. Maybe if there was a JSF standard somewhat like the emerging JSR 296 for Swing, I'd buy into it. At any rate, it looks like the good parts of Creator are making their way into NetBeans.

Finally, I felt this was my chance to kvetch about my single biggest peeve with NetBeans: No workspaces. I have a dozen different Eclipse workspaces (for books, open source, college courses, etc.). Each has a separate set of coding conventions and libraries. Some of them contain a single project, others contain hundreds. (The Core Java and Core JSF workspaces have a project for every sample program.) Of course, a corporate developer doesn't care so much, but consultants, book writers, professors, etc. surely do, and they are in a position to convince lots of folks to give NetBeans a try. If you want workspaces in NetBeans, add a comment to this blog, and I'll make sure to let them know :-)

Scala

Martin Odersky gave a very nice introduction into Scala. I was sorry to see how poorly it was attended. Here is a language with a fresh perspective on so many things that are an issue with Java: Good generics, closures, modules for programming in the large, domain specific languages. Check it out and be amazed at the work of true professionals in language design. When Gosling designed Java, I felt that we got the best thinking on practical language design at the time (ok, except for synchronized and labeled breaks—perfection eludes even the demigods). Scala brings back that feeling, and it makes other languages that should not be named (such as Groovy) look rather amateurish.

BTW, Martin referenced Guy Steele's classic (1998) talk Growing a Language. If you have never read it, check it out—it is great fun, unlike some of the other links that I suggested solely to appear smart.

On the way out, I ran into Brian Goetz, Josh Bloch, and Neal Gafter; these are people who are much smarter than me, and they are paying attention to Scala.

We had an animated discussion about closures, annotations, and properties in the hallway. Something is likely to happen with all of these in some future version of Java, but it looks as if that might be Java 8 rather than Java 7. I think that's ok. It is better to get some experimental results and not rush into changes that one later regrets. Neal thinks that it is possible to fix up the biggest issues with Java generics by supporting reification. That would be a relief. He went on to give his closures presentation which I had already seen at SJSU, so I went home for a much needed nap.

What does it all mean?

Here is my take on the 12th Java One. It wasn't the most exciting Java One ever. The very first Java One was stunning. It was also a bit creepy. The show was run in parallel with the venerable Software Development conference. The SD exhibit hall was the usual freewheeling bunch of booths, but all Java One booths had the same yellow/red/blue color scheme, just like you'd imagine a trade show in North Korea.

The shows that introduced Java 2/EJB and Java 5/EJB 3 were very exciting because there were such big platform changes. The shows that focused on Java ME were particularly unremarkable—this may be my parochial US perspective where the telco oligopolies won't let you deliver your apps.

This show was somewhere in between. Four things impressed me:

1. The sleeper announcement was the completion of the open sourcing of Java. This is a hugely important event that we will all appreciate when, twenty years hence, we will still be laboring on in Java when other proprietary systems have come and gone.

2. Tooling has come of age. It takes the NetBeans and Eclipse folks months, not years, to bring us plugins for Ruby, Swing UI frameworks, etc. etc. We yawn when we see another NetBeans demo. There was a time when we all longingly looked at Microsoft's Visual Studio, but those days are gone.

3. We have not reached the end of history with language design. Having lots of scripting languages is not the answer.

???4. The most important event in my mind was Sun's renewed commitment to the desktop. Look at David Bock's interview with Bob Brewin. It is now apparent to the top brass at Sun that there are serious issues, both with a dated look and feel and with internet delivery. Java FX Script is a great step forward for look and feel, but there remains an awful lot of mundane engineering work to get rid of freezing browsers, incomprehensible certificates, and the dreaded spinning coffee cup. I truly hope that Sun will follow through and fix these problems the old fashioned way, with blood, toil, tears, and sweat.

Finally, I learned that reporting is hard. It is taking me a long time to write these blogs. The folks who write real newspaper articles every day, with all facts checked, on deadline, deserve great respect. I am glad to relinquish my title of intrepid reporter until the next Java One and go back to coding, teaching, book writing, and feeding the twins. Thanks Chi for feeding both of them while I got to enjoy Java One!

This is my third day of reporting from the floor of Java One. I ran into a number of very interesting folks, got the chance to ask more hard-hitting questions, and had a mixed bag of sessions.

GlassFish and World Wind

I started out with a presentation on the architecture of GlassFish v2. The speaker said parenthetically how more service providers were offering GlassFish hosting. That's welcome news indeed. Right now, everyone will gladly host your PHP app, but try finding a host for JSF+EJB3 at reasonable prices.

Unlike v1, which focused on delivering the EJB3 technology, v1 is an enterprise scale server with clustering/failover, and support for WSITand JBI. I can already tell that I am totally out of my depth. (It seems kind of sad that one needs a technology for web services interoperability—wasn't that the point from the outset?) I am afraid I wasn't the only one. The presenter went on to say how they needed an open source, lighter weight alternative to HADB, and he polled the audience on their knowledge about HADB itself. Not many hands went up.

The speaker did a great job explaining what goes on under the hood, and I learned a bit of how replication and failover worked. I gained tremendous respect for the hard problems these folks are solving. But then there were rounds of applause from the neighboring room, and I left for greener pastures.

The applause came from the NASA World Windpresentation. Unfortunately, I had missed all the cool demos and got treated to more architecture slides. The hardest problem for them was image selection—the user zooms in, and each tile is several megabytes in size. Which images do you show? Another problem that I am glad not to solve. Interestingly, the speaker said "I gave up on Java 5 years ago, but it has come a long way. I am back."

Audience question: "Can I cache the data locally? Or is that terabytes of data?" Answer: "Petabytes (laughter from the audience). But you could pick the terabytes you need (more laughter)".

People I Ran Into

I cornered Chris Oliver at the Sun booth and he was kind enough to answer some impolite questions about Java FX Script. (Doesn't that name just roll off your tongue?) Why not just build a domain-specific language on top of, say, Groovy? Groovy is slow and not of the highest quality. Isn't it a burden to have to learn another language? Programmers are smart people, and it won't be a big deal for them. Is he happy about the support he is getting from the NetBeans team? That's not his concern; someone at Sun will make it happen. What about multimedia? Java multimedia support has problems; someone at Sun will need to fix that. He is happy that he is getting a first-rate person to write the compiler; that means more to him than being featured at the keynote.

On a completely different topic (that is dear to my heart but quite possibly not to many of my readers), I had a good conversation with Stanley Doherty of Sun about DITA. When I write books, I use FrameMaker. It hasn't been updated for ages; it doesn't even have basic comforts such as multiple undo. But it has one endearing feature. As an author, I can use a handful of tags (code, note, heading1, figure etc.), someone else can prettify it to the point of a printable PDF, and then I can work off the prettified version for the next edition. But everyone wants to move to XML. I do a lot of casual writing with XHTML+CSS, using XMLMind and Prince. I always told myself to learn DocBook, but Stanley thinks I should learn DITA instead—it's simpler and has momentum. I'll definitely look into it.

Brian Goetz did the book signing for his excellent concurrency book that you all should buy. He had been kind enough to read the concurrency chapters in a couple of my books and gently disabused me of my naivete. We talked about how hard concurrency is, and that there would be a lot of blood on the floor with multicore and the end of Moore's law. He said that the best solution would be something analogous to garbage collection for concurrency. Then the VM and not the programmer would figure out how to get concurrency right. This may happen at some point in the not too distant future. He suggested that I read this article.

Off topic: Maybe generics is too hard? The JavaOne TODAY magazine (btw, whatever happened to carbon neutral???) had this depressing paragraph: “If you are new to generics, you might assume that generic collections are polymorphic. In that case, it would be correct to assign an object of typeList<Item> to an object reference of typeList<Object>. However, such assignments produce compile-time errors.” Well, that's how it must be. There is no ListStoreException, and there can't be because of erasure. Would it have been better to forego erasure, have collections remember the element types, allow conversions to supertypes, and give runtime exceptions, just like arrays do?

Groovy, More GlassFish, Phobos, and the Cambrian Explosion

In the afternoon, I went to Rod Cope's Advanced Groovy session. I didn't think it was all that advanced, but it was kind of cool to see him use a Swing program to drive an Excel spreadsheet, all wired together by Groovy.

The GlassFish v3 talk was a bit of a disappointment too. GlassFish v3 has a module-based architecture, loosely based on JSR 277. That's why it started up so quickly in the keynote demo. That's kind of cool, and I learned a bit about modules and classloaders and Maven 2, but it didn't really help me be more productive with GlassFish.

Afterwards, I cornered Jerome Dochez and asked him what he was doing about another one of my pet peeves, the Stack Trace from Hell. When something fails, I want the IDE to point me to the offending file name and line number in my code, not show me a humoungous stack trace. He agreed that the module system per se did nothing to address this, and he suggested we meet after Java One. I'll take him up on it. This is actually a hard problem to solve, as one of my graduate students knows only too well. Chunming Dong is working on getting accurate error information all the way from JSF/JSP through GlassFish to NetBeans. Each time I meet her, I repeat the mantra: File name/line number, File name/line number.

Finally, I went to the Phobos talk, both because it seemed cool from the keynote demo and because I promised another graduate student to go. Tom Austin is putting a metaobject protocol into JavaScript, and he quickly put together an imitation of Ruby's ActiveRecord, which is of course called RhinoRecord. (Phobos uses JPA instead, which makes a lot of practical sense but it isn't a cool use of JavaScript.) The most interesting part of the demo was how easy it was to move JavaScript code from the client to the server to configure an Ajax component.

??? I feel like we are in theCambrian Explosion period of web frameworks. JSF, GWT, Phobos, Rails, Rife, Tapestry, even PHP and ASP.NET have some great benefits. But this can't go on. At some point, evolution needs to winnow down the field.

Check out Elliotte Harold's notes, in particular the API principles. I wish I had been able to go to those presentations as well.

???This year, I got a genuine press pass from a kindly soul at Sun. While my quest for priority seating was still futile, I made progress on my quest to locate the stash of free booze, and I got the chance to ask more hard-hitting questions. Here is your intrepid reporter's take on day 2.

Mr. Darcy

???Last night, our cat, Mr. Darcy, escaped, and it took a couple of hours to locate him. As a result, I overslept and missed Gavin King's presentation on Web Beans. That's too bad—I enjoy Gavin's presentations, particularly since he isn't shy about voicing his opinions. I looked at the slides and was amused by this bullet point: "True AOP is a boondoggle—an absurdly overcomplex solution to a narrow range of problems."

Off-topic: Check out the Greenfoot entries.

More off-topic: If you are packrats and want to get the PDFs from all the presentations, put this Groovy script

def myDocument = new XmlParser( new org.cyberneko.html.parsers.SAXParser() ).parse("http://www28.cplan.com/cc158/sessions_catalog.jsp?ilc=158-1&ilg=english&isort=&isort_type=&is=yes&icriteria1=+&icriteria2=+&icriteria7=+&icriteria9=&icriteria8=&icriteria3=")
def links = myDocument.depthFirst().A['@href'].findAll{ it.endsWith(".pdf") }
for (l in links) println("http://www28.cplan.com" + l);

in a file pdfs.groovy and run the following in bash:

groovy pdfs.groovy | xargs wget --user=******** --password=********

You should have received an email with the username/password.

JPA 2.0

Linda DeMichiel gave an overview about JPA 2.0. (If you haven't looked at JPA 1.0, you should. It is very developer-friendly and you can learn it without ever bothering with the nasty parts of the old EJB. You can use it in standalone or plain web applications, outside an EJB container.)

JPA (as part of EJB 3.0) was a great start, but it was a 1.0 release. Some open issues and ambiguities, a few bugs, and some missing pieces. In 2.0, expect clarification, reduction of non-portability issues, and some enhancements. It's a new JSR, completely decoupled from EJB

The enhancements seemed pretty straightforward. Embeddables can contain other embeddables; the whole hierarchy gets flattened. Sets of primitives and strings can be declared conveniently. One-to-many bidirectional mapping will be supported. The table-per-class inheritance strategy will be required.

??? My pet peeve will be addressed, and we'll get some kind of ordered lists. That is, when I persist

@Entity public class Quiz
{
   @OneToMany @Ordered @OrderColumn // strawman syntax
   private List<Question> questions;
}

the order of the question is remembered, by storing an index into another column. There is a headache about inserting into the middle in the list; she wasn't sure how that would be addressed.

JPA 1.0 forces single access type (either fields or getters/setters) for every entity hierarchy. I don't think I care since I always use fields. Then again, maybe I do, if I want to use getter/setter for debugging in one case.

Some JPQL limitations will be removed. You'll be able to say

SELECT d.name, SUM(c.hourlyRate * c.hoursWorked * 52) FROM Contractor c JOIN c. dept d GROUP BY d.name

There will be some syntax for dynamic queries where one adds criteria objects rather than building up strings. It sure would be nice to have a domain-specific language rather than cumbersome chained method calls, but Java doesn't support DSLs (yet?)

Configuration hints will be provided in a uniform way, not ad-hoc escape hatch. Obvious candidates: JDBC params, timeouts, logging, DDL handling. Put them into javax.persistence namespace

We'll get better support for detached objects (another pet peeve of mine): fetch plans, predictable behavior when unfetched state is touched.

Depending on timeline, there may be alignment with the general-purpose validation mechanism of JSR 303.

Overall, it seems like an evolutionary improvement of an already very good API.

Google Web Toolkit

My Core JSF coauthor, David Geary, has just finished a book onGWT and keeps telling me how cool it is (“Swing for the web”). I knew nothing about it and was skeptical when I first hear that they translate Java code into huge gobs of client-side JavaScript. But I was quite impressed with the presentation.

I am more than a bit scared of writing Ajax code myself. With JSF, I can presumably just drop in someone else's well debugged Ajaxified component. I don't actually hate writing JSF (well, except for the Stack Trace from Hell), but I don't enjoy it much either. GWT seems non-scary, even fun, especially if I can figure out how to use JPA on the backend. I'll give that a try in my copious spare time.

Mylar

At the show floor, I stopped by at the Eclipse booth and kvetched about how tedious it is to install the plugins for JSF and JPA, and how much easier it is to just use NetBeans. The fellow at the booth turned out to be Mik Kersten, the creator of Mylar. He agreed that Eclipse needed to get their act together with packaging but he still felt that it had an edge because there are so many cool plugins such as, well, Mylar. He gave me a demo, and it was cool. You can deal with bug tracker issues right in Eclipse without ever going to Trac or (blecch) Bugzilla. Bugs are tightly tied to code lines. Also, Mylar remembers the parts of code files that you have recently looked at and hides everything else. You focus on the stuff that you care about, not the mass of other files in the project. Here is a better explanation with screen shots by Kirill Grouchnikov.

I am glad that we have both Eclipse and NetBeans around.

Extreme GUI Makeover

It's a Java One tradition. They take an ugly Swing app and add gratuitous eye candy with as few lines of code as possible. Such as:

  • A VM splash screen that subtly morphs from a sepia image to a color image
  • The Nimbus look and feel
  • Round borders and gradient backgrounds
  • Text fields that quiver if validation fails (uses the timing framework)
  • The SwingX reflection renderer
  • Pretty custom components
  • Table features (text, gradients) that span multiple columns
  • Animation effects for table sorting

The table effects had pretty nasty looking code, though. I called it quits and went to a press-only round table discussion on JCP.

JCP

There was a distinguished panel, including Danny Coward, Linda De Michiel, Hani Suleiman, a bunch of folks from big corporations, and the director of the JSR program, Onno Kluyt.

Someone asked the obvious question: What is the difference between the JCP and OpenJDK. Answer: The JCP defines what Java is, the OpenJDK provides an implementation. There can be only one Java standard, but there can be multiple implementations.

I asked hard-hitting questions about the lack of openness in the expert group deliberations, and the risk of expert groups with tunnel vision delivering less than optimal results. It might have been polite not to cite JSR 127 as an example, but I showed no such restraint.

Answer: (1) The expert groups in the smoke-filled back room are a sign of the past. Nowadays, the process is much more open. There are multiple interim deliverables so that unhappy stakeholders can squawk early, and many JSRs have open mailing lists. (Onno told me later that he would like to see that as a requirement, not just an option, at some point in the future.) (2) If a JSR goes off the deep end, the executive committee can stop it.

When the discussion petered out, someone mumbled something about "cocktails in room 114", and off we went. Apparently, the secret to free drinks is to stick it out until the end.

Java FX Script

I was so proud of my foresight that I had reserved a seat for the F3 presentation, long before I knew that it would be the star of the show and prepared to smirk at a long line of people without pre-registration. But there were plenty of empty spaces.

Chris Oliver gave an overview of Java FX Script. (Doesn't that just roll off your tongue? After a couple of failed attempts, he just called it JFX.)

He started out asking:

  • Why do they have the web guys (!) do the Swing GUI prototypes?
  • Why do I always end up with a writhing mess of Swing listeners?
  • Why does the UI always end up as unattractive nested grayish rectangles? (Unless you are Romain Guy)

As we all know from the keynote, JFX is the solution: a toolkit to produce flash-like GUIs with a declarative programming language.

The language is interpreted; it will be compiled at some later point. It is statically typed.

You build component hierarchies in which every line, rectangle, etc. is a component. Any Swing component can also be included. You declare properties for each component, such as position, color, transparency, transforms, filters (glow, noise, etc., like in Gimp/Photoshop).

If Java allowed for domain-specific sublanguages, could this be done in Java? Or Groovy? (Chris Oliver doesn't believe in duck typing and isn't shy about saying so.)

There is a bind keyword for binding values/components (?) together. When a one of them changes, the bound entity also changes. An example: We have an animation

rotval = [0...360] dur 1000

That is, rotval goes from 0 to 360 in 1000 milliseconds. Bind a rotation transform property of a rectangle torotval. As rotval changes, the transform changes, and the rectangle rotates. That's how one avoids the writhing mess of listeners. According to Chris, data binding is not a part of any mainstream language. It can be found in functional reactive programming languages.

In the Q&A, Elliotte Harold asked why not just use SVG. Answer: SVG behavior is specified by JavaScript operations on the DOM, which is less declarative and messier.

At the end, there were more flashy demos. Chris: “Whatever you can do in Flash, you can do in Java. JFX gives you a faster way of expressing it.” (I should have asked “What about multimedia?” I'll have to work on my reporter skills.)

???This year, I got a genuine press pass from a kindly soul at Sun. I was excited about priority seating and unlimited free booze in the press lounge, neither of which I was able to locate. But I did get to ask hard-hitting questions in the press conference. Here is your intrepid reporter's impression of day 1.

Ubuntu

As an intrepid Ubuntu user, I was glad to see several other intrepid folks with the telltale orange screen. Actually, I turned my screen into a tasteful blue-gray, but for solidarity's sake, I should change my theme for the duration of the conference. I do love my Linux system, but I am painfully aware of its limitations, and I don't expect it to go mainstream for some time. I was quite amazed to hear that Linux was mentioned several times as a major reason for using the GPL for the open source JDK.

Somewhat off topic, last night I met a former student of mine, Felipe Ortiz, who handed me a business card with the URL of his cool blog at http://juixe.com/techknow/. It is always nice for a teacher to see former students doing well.

The Morning Keynote

I am not a fan of keynotes, particularly those at 8:30 am when I am (a) awake enough to register the theatrics and executive speak and (b) find both highly annoying.

Rich Green started out with an announcement on how Ericsson contributed an open source implementation of something called IMS to Glassfish. Apparently, this is a big deal for all of you who run wireless telco operations. Not a good way to start the day. Next came the CIO of Nasdaq who was excited how real-time Java (which is actually JSR #1!) will make trading better. No technical details were presented, so I took her word for it. Next, a fellow from Sony said that we all have to watch Spiderman 3 on a Blu-Ray disk. The Blu-Ray standard includes a version of Java, which is cool, but I don't see how that grants Sony the license to torture developers with Spiderman.

Rich went on to say how NetBeans is one of the most important things about Java. I do agree that NetBeans has come a long way. He said that there is a NetBeans plugin for contributing OpenJDK fixes, which sounds nifty. I'll have to check it out.

He said OpenJDK is complete, but afterwards I heard from Elliotte Harold that it isn't quite so—some pieces are still encumbered by proprietary licenses. Another thing to check out. There is an interim governing board for OpenJDK, consisting of Doug Lea, Fabiane Nardon, Simon Phipps, Mark Reinhold, and Dalibor Topic. I know Doug, Simon, and Mark to be very reasonable people, so that's a good sign. I am sorry to say I know nothing about the other two (no offense :-)) Their first task is to draft a constitution.

Rich mentioned that they were working on giving access to the TCK (used to test whether a third party implementation is compatible with Java) to "as many people as possible". That is executive speak for "not everyone". I am afraid I never quite understood why this is an issue. Why can't everyone see the compatibility suite and use it? Assuming, of course, that it is any good. It seems a daunting task to develop a reliable set of tests for the entire Java API.

F3, erm, Java FX Script

The most interesting part of the keynote came at the end. Sun wants to re-focus on Java on the desktop. As we all know, there are lots of Flash sites, but Java applets and Web Start are rarely seen these days on consumer sites. It's easy enough to see why. (1) Producing flash-like effects with Java2D is like eating soup with a fork and (2) JVM versioning on consumer desktops is a nightmare. Sure, 85% of consumers have a JVM, but lots of them are ancient or the browser integration is misconfigured.

Sun announced a plausible solution to the first problem. A Sun programmer, Chris Oliver, had produced a Flash-like scripting language on top of Swing/Java2D called F3 (which stands for “form follows function”). The marketing folks promptly renamed it Java FX Script. Say it a few times. Doesn't that just roll off your tongue?

Certainly, having an API for flashy effects makes a huge amount of sense, and it is plausible that a scripting language is more accessible to web developers than a Java API. The demos were cool. But do I want to learn yet another scripting language?

James Gosling came up on the stage and asked "Why another scripting language?" Good question, I thought. He said something about how scripting languages need to be tightly focused on the application domain.

I don't buy that. Ruby isn't tightly bound to web programming. Instead, the metaobject protocol makes it possible to define a domain-specific language. Ditto with Groovy and the XML or Swing builder syntax.

I see all the various scripting languages (Perl, PHP, Python, Groovy, Ruby, etc. etc.) trace out the same evolutionary path, accreting features such as OO, closures, and a MOP. Now that we know that, wouldn't it make sense for the Java platform to provide a common foundation for scripting language features? Java gives me “learn once, code anything” for a strongly typed language. Similarly, I would like to learn one scripting language really well, and then learn APIs and domain-specific languages as needed, for flashy UIs, web programming, etc. Couldn't Sun provide some leadership here?

In my persona as the hard-hitting reporter, I asked just that question in the post-keynote press conference. I stated that I need a bunch of scripting languages with gratutious differences like I need a hole in my head. That apparently riled Rich Green who told me in no uncertain terms that lots of different languages, each targeted for a different application domain, are the best thing anyone could want. I know he is a smart guy, certainly smarter than I am, but I am still not convinced.

The Afternoon Keynote

Danny Coward talked about what's great about Java SE 6. I'll spare you the details. He gave a bit of a glimpse about Java SE 7, mentioning superpackagesand “super JARs” that may be interoperate with OSGi. More stuff to look into.

Charles Nutter and Tor Norbye demonstrated how a third party Rails app (Mephisto) runs in JRuby and can be deployed on Glassfish.

Bob Brewin promised that a "better install experience" would come to consumer desktops next year. Not a minute too soon.

Then we got a demo about web application development in yet another fine scripting language, JavaScript, with jMaki and Phobos. I really like JavaScript and agree with Douglas Crockford that it is widely misunderstood. It was neat to see how no redeployment was necessary. Just change the code in NetBeans and hit refresh on the browser.

Jerome Dochez showed a modular Glassfish v3 with a kernel of < 100KB (not quite sure what that measures) that starts up in < 500 milliseconds (with no container, of course). The kernel loaded a Rails app in 14 seconds and a Phobos app and a classic WAR file in < 1 sec. It can also load a PHP container.

???Finally, we got some really cool eye candy: the NASA World Wind geospatial browser. It's an open source project, and it can be easily integrated into a Java desktop app. I really want to try this out. It would make a great demo of the power of Java at the beginning of my CS1 class.

More eye candy from Project Iris: a cool photo organizer that is based on applets that are seamlessly integrated into the web page, with some secret CSS sauce. Apparently, it was quite a challenge to make it work in all browsers and it took several weeks of development time. Chris Oliver recoded it in F3, erm, Java FX Script—doesn't that just roll off your tongue?—in a couple of days. Either way, it was slick. If Sun fixes the applet/Web Start delivery problem, I have high hopes for a resurgence of the Java desktop.

Session Notes

I went to Josh Bloch's and Bill Pugh's puzzler talk. It was fun as always, but I don't want to give away anything since they'll run a repeat session. Just one hint: The automatic conversion fromint to float is truly evil. (Every time I revise that section in Core Java, I end up double-checking the language spec because it seems so unlikely that they would have done it that way.)

I really like JPA, and I do just enough Java EE to leverage JPA in web applications. I went to the Java EE 6 talk and didn't learn too much that I found relevant. The best news is that the packaging nightmare should go away; a simple app can just put everything into a WAR. Hooray!

???This year, I got a genuine press pass from a kindly soul at Sun, which entitles me to priority seating at the keynote, the opportunity to ask hard-hitting questions in the press conferences and unlimited free booze in the press lounge (I hope).

JavaFX

???The day started with an 8am conference call for Java Champions, an august group of Java evangelists. Bob Brewin was supposed to tell us all about F3, erm, JavaFX, except he got cold feet at the last minute, and he only gave out vague generalities about the resurgence of web-delivered desktop apps. I practiced my “reporter asking hard-hitting questions” persona and asked him why applet/Web Start/JVM versioning on the desktop was in such sorry state, and why it didn't get enough engineering attention at Sun. He agreed that this was a problem. This InfoWorld article has the actual JavaFX news.

NetBeans

Last year, there was a free NetBeans day at the Argent, erm, Westin San Francisco Market Street Hotel. It was very crowded, so I was glad to see it moved to Moscone this year. There were several other tracks too, on GlassFish, Linux/Solaris, and Web 2.0. The NetBeans track. had a slick presentation covering GUI builder improvements in NetBeans 6 and a nifty demo involving JXMapViewer. This isn't your grandparents' NetBeans.

Another NetBeans presentation showed the Ruby support. I must admit that I have never quite caught the Ruby/Rails train. Ruby looks nice enough, but it doesn't really solve a problem that I have. People told me that duck typing would bring me freedom. I tried using Groovy for some data manipulation work, figuring it would be easier to pick up than Ruby. I ended up going back to Java. Sure, Groovy has a prettier loop for iterating through the lines of a file, but in the end I preferred autocompletion in the IDE and compile-time error checking.

Rails addresses a pain point (Java web applications), but I was never able to get past the example that shows

some Ruby loop structure 
   <td>...</td>

JSF may be no walk in the park, but at least I don't have to worry about HTML table tags—I just use a h:dataTableand bind it to a list of objects. What would I do in Rails if I had to stripe every second row with a background color? Write nested loops???

Sure enough, the same code showed up on today's slides.

There was a demonstration of a Rails debugger that lets you set breakpoints in a mess of HTML+Ruby code. But only if you use the right kind of debugger. That looks like work in progress, but overall it is pretty amazing that you can do so much Ruby work in NetBeans.

In the last talk of the day, a fellow who had been programming Java for all of seven months showed off his SunSPOT powered app that rewarded his dog with food pellets. What did he use for his web UI? The NetBeans wizard for JSF.

Groovy

The No Flufffolks hosted a presentation on Groovy and Grails at the trendy W hotel. I was glad I went. Much better food than the awful Moscone fare. (Before today, I had never had soggy pretzels.) Nice presentations by the Groovy and Grails gurus, Guillaume Laforge and Graeme Rocher.

I really want to like Groovy. It looks like Java and it is tightly integrated into the JVM. My problem is that I don't understand it. When I first saw it a couple of years ago, I found out to my horror that there was no grammar. The only way to check the meaning of an expression was to feed it to the interpreter du jour. They fixed that now. A few weeks ago, I used Groovy as an example for metaprogramming in my graduate programming languages course. I had a nifty lab where I added a method to java.awt.Point. Trouble was, the method was not inherited. I spent a few hours looking at scarce documentation and a complex implementation. I was unable to find a spec for the MOP. Being the hard-hitting reporter, I cornered Guillaume who cheerfully agreed that no such spec existed. The MOP is whatever it is in the implementation du jour. These things make me appreciate the Java culture of “one specification, multiple implementations”.