Mikhail Gorshenev's blog
Archives
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today
Click me to subscribe
Search

Links
 

Today's Page Hits: 1

« JavaOne 2007 | Main | JavaOne 2007, Part... »
Saturday May 12, 2007
JavaOne 2007, Part 2: Trends

A few things which I found interesting at the conference this week.

Java EE: Ajax and Web 2.0

Ajax has finally come of age. The were 63 (!) AJAX and Web 2.0 sessions. It is astonishing to see how the 10-year-old technology suddenly becomes mainstream. JavaScript and dynamic HTML are almost as old as the Java platform itself, and dynamic web pages with server-side logic have been used for years, but the potential remained greatly underutilized until recently. Nowadays we can see all sorts of applications deployed through a browser. Google Maps was only the beginning. Now everyone is using Ajax. Such traditionally thick software as IDE or OS can be run in a browser window offering quick response time and the full range of features complete with sound effects and video streaming (TS-6839).
Ajax is quickly advancing into the mobile space as well (TS-5525). Will Mobile Ajax revolutionize the mobile application development as we know it?

Java SE: language features

I am always worried when I hear about new Java language features. What greatly attracted me back in 1996 was the simplicity and the relative ease of writing (and, more importantly, reading) the code in Java. Relative to C and C++ that is. Now with its seventh iteration in the making, the language is clearly losing the original simplicity which was so appealing in JDK 1.0.x. Introduction of inner classes back in JDK 1.1 was the first small step and many more features were added since then. Autoboxing, generics and varargs are the few language additions I greatly dislike. Generics, while useful in principle, are simply overly complex (see Ken Arnold's old blog "Generic Considered Harmful"). There are three "evil" features in C++ which made Java language so elegant in comparison: templates, pointers and operator overloading. But they are slowly creeping in!

I just love Josh Bloch's Java Puzzlers talks. This year was no exception. Josh and prof. William Pugh put on a great show! (TS-2707) One of this year's puzzlers shows the harmful autoboxing. The following code will unexpectedly print "3.0" because of automatic unboxing, lossy conversion and boxing. Counter-intuitive and potentially dangerous!

    Number num = true ? new Integer(3) : new Float(1.5);
    System.out.println(num);

In JDK 7 we may see even more language features. Will they be a useful addition to the language? When I found out that Neal Gafter is doing a presentation on closures proposal (TS-2294), I knew I had to check it out. I must admit I had to download the slides after the session in order to understand what is being proposed. The goal is noble: provide an alternative for the hard-to-read syntax of the inner class and template combinations. But the proposed replacement isn't exactly easy to understand either. Here is one of Neal's examples.

Today:


    void addListener(final ItemSelectable is) {
        is.addItemListener(
            new ItemListener() {
                public void itemStateChanged(ItemEvent e)
                { doSomething(e, is); }
            }
        );
    }

Same code in the proposed syntax:


    void addListener(final ItemSelectable is) {
        is.addItemListener(
            { ItemEvent e => doSomething(e, is); }
        );
    }

The ugly construct is replaced with the one that is hard to understand and, possibly, maintain.

Java ME: interactive TV is finally here!

When I jumped on the Java TV boat back in 2000 (the boat was pJava-powered ), I did not originally expect the journey to take this long. A few years later I was thinking it may never be over. But we are finally arriving at the interactive TV age: BD-J players are now in the nearby electronics store. Unfortunately, it is still too early to claim success. There are more than 200 Blu-ray titles available, but only 6 (!) use BD-J features. Movie studios say that player compatibility issues and lack of applications are the primary reasons (TS-5723). The compatibility issues are troubling. Is this a sign of the "F" word in the TV space? I mean fragmentation, of course.

Posted at 01:05AM May 12, 2007 by Mikhail Gorshenev in Sun  |  Comments[0]

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed