The Source for Java Technology Collaboration
User: Password:



Cay Horstmann

Cay Horstmann's Blog

Java One Day 0

Posted by cayhorstmann on May 07, 2007 at 11:44 PM | Comments (4)

???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:dataTable and 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 Fluff folks 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”.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • That's funny, I actually overheard when you were talking to Guillaume, and he had no good answer for the lack of documentation and lack of actual comments in the Groovy code.

    I also don't get it, but at least what I got out of the No Fluff stuff is that it's easier to migrate from Java to Groovy than it is from Java to Ruby. Not sure if it's worth the effort at the end, the language doesn't seem that elegant to me. Then again, I haven't coded anything in it, so I really should reserve judgment.

    Posted by: augusto on May 08, 2007 at 02:06 AM

  • I have found a good use for Groovy when I need to write some command line tools. Say to pull all the rows out of a join and then export that as a xml file for import into an LDAP tree. Or vice versa. Would take tons more code in Java than in Groovy. FWIW.

    Posted by: kslater on May 08, 2007 at 06:49 AM

  • While F3/JavaFX has cool features, I very much agree that plain Java would be just fine for competing with Flash and Silverlight. It was almost good enough 10 years ago. And it has stayed almost good enough for the past 10 years. Applets just haven't really quite gotten there. I don't like to kill browsers, hang computers, or watch fancy Java logos while applets load. And that's what applets do. I generally disable applets in my browser because hitting a site with applets just kills things. (I've experienced pain on both Windows and Mac. Never got a Linux system with Java applets support.) I usually don't mind JNLP as much, but how it brings up the silly downloads window in Firefox and litters the desktop (or wherever) with worse than useless JNLP files is also annoying. And maybe I haven't learned the system well enough, but I've had cases of using old cached apps instead of getting the new one automatically.
    If Java Applets and Web Start just worked (and if Sun released for Mac simultaneously with Windows and Linux), then I'd be much happier with the situation. I don't see how JavaFX is going to fix those problems.
    Streaming media would be a nice new feature, though.

    Posted by: tompalmer on May 08, 2007 at 11:22 AM

  • I have taken the time to work with Groovy. Admittedly the lack of documentation makes for a learning curve that is steeper than I would have liked, but that is made up with the books that you can pick up. I have more than recouped my time investment by having the ability to do more work with significantly less code.

    I've learned to work with closures, meta programming, currying and builders without sacrificing my Java expertise. Picking up a scripting language that rivals the productivity boosts normally associated with the likes of Ruby & Python without losing ANY Java investment is priceless.

    Posted by: cafrias on May 08, 2007 at 11:54 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds