Skip to main content

The Spring Experience 2006 (2)

Posted by emcmanus on December 18, 2006 at 6:54 AM PST

I'm writing this in what I used to think was the world's
nastiest airport,
where I have a five-hour stopover. I'm somewhat revising my
opinion of the airport because I discovered a "Quiet Seating Area"
with real seats and real quiet. A bit like a business-class
lounge but for the plebs. So I'm sitting there typing this, with
my laptop on a table and the charger plugged in and
everything.

As I mentioned href="http://weblogs.java.net/blog/emcmanus/archive/2006/12/the_spring_expe.html">last
time, I was at href="http://www.thespringexperience.com/">The Spring
Experience 2006 in Hollywood, Florida where I was speaking
about JMX stuff.

I had been surprised at how close the href="http://www.diplomatresort.com/">conference hotel was
href="http://travelchannel.igougo.com/photos/journal_photos/diplomat.jpg">to
the sea. the conference centre within the hotel.-->In France, the infamous
loi littorale forbids construction within a certain
distance of the sea, unless you are a member of the Saudi royal
family that the French state href="http://www.pariscotedazur.fr/archives/2006/07/04/557-la-villa-du-roi-fahd-a-golfe-juan-">doesn't
want to displease. The idea is of course avoid the sort of

concrete nastiness
to be seen in certain neighbouring
countries.

Anyway, some local friends set me straight. When the hotel was
built, the sea was further away! That doesn't happen much with
the dull old Mediterranean, but over there in hurricaneland it's a
different story. A constant battle with a shifting shoreline, in
fact.

But back to your regular scheduled geekery. Here are some of
the talks I attended.

Rapid Web App Development (Rob Harrop)

This was mostly about href="http://www.springframework.org/go-webflow">Spring Web
Flow, so
I'll leave detailed comments to the Spring experts. I came away
with a few items of general interest:

  • Good tools are essential. Rob recommended having a good
    IDE (IDEA, Eclipse WTP, NetBeans). He was surely preaching to
    the converted here, but maybe there were one or two diehard
    Emacs users in the audience.

    [I like Emacs a lot, and in fact I'm typing this using it.
    But I wouldn't think of using it for serious Java
    programming. There have been href="http://jdee.sunsite.dk/">valiant attempts at
    producing IDEs in Emacs, but even I am not mad enough to use
    them.]

    Rob also recommended the href="http://jetty.mortbay.org/">Jetty web
    server, at least for development. It starts in about two
    seconds and has reliable hot deploy, apparently unlike its
    rivals.

    Finally, Rob recommended Maven, notably because of its good
    integration with Jetty.

  • For serious work, you need to be able to attach to your
    app server with a debugger
    . It might take a bit of
    investigation to figure out how to do this, but it is a
    worthwhile investment.

    I use NetBeans and Glassfish, and this is trivially easy.
    Right-click on the app server in the Runtime tab and select
    "Start in debug mode". Then, with your web app as your main
    project, do "debug main project" (F5). NetBeans deploys the
    app, launches it in your browser, and attaches the
    debugger.

  • Rob demonstrated the use of href="http://jruby.sourceforge.net/">JRuby
    for parts of the web app that may change often, such as the
    formatting within a page. Spring can be set up so that it
    continually polls the file containing the Ruby script for
    changes and reloads the script if it finds any. The result is
    that you can change the script and immediately see the result in
    your browser without any redeploy step. Requests that were in
    progress before the change continue with the old version, and
    new requests use the new. Nifty.

Spring and dynamic languages (Rod Johnson, Guillaume LaForge)

Rod presented the general Spring support for dynamic languages,
such as Groovy, href="http://www.beanshell.org/">BeanShell, and href="http://jruby.sourceforge.net/"> JRuby. Then
Guillaume, who is the current holder of the Groovy torch, talked
about that language in particular. Script languages lend
themselves well to interactive demos, with the presenter typing
in some stuff and showing what it does. Several speakers showed
this in fact, with varying degrees of success. Guillaume's demo
went off well, except when he was smitten by the demo gods. His
computer went spontaneously into hibernation in the middle,
which caused Guillaume to emit a bad word.

I'm not sure what to think of Groovy, myself. On the plus
side, it is very similar to Java, so easy to learn and read, and
it has some powerful features. On the minus side, it smells a bit
like Perl, with these individually-nifty features slapped together
without a coherent philosophy.

JRuby (Rob Harrop)

There was some overlap with the Groovy talk here. Rob walked
through some examples of Ruby programming, stressing the
interactivity and the access to the Java platform classes. One
thing I picked up on is that Ruby (and Groovy) can make the JMX
API's href="http://java.sun.com/javase/6/docs/api/javax/management/openmbean/package-summary.html">Open
Types much more palatable. You can set things up so that
instead of accessing a field in a href="http://java.sun.com/javase/6/docs/api/javax/management/openmbean/CompositeData.html">
CompositeData using
cd.get("maxTime") you can use
cd.maxTime. In fact Open Types are an excellent
fit for dynamic languages and I think we should revisit the
JavaScript library in the href="http://blogs.sun.com/sundararajan/entry/using_script_shell_plugin_with">script
plugin for JConsole to take that into account.

Code organization for large systems (J

Related Topics >>