Are applets making a comeback?

Good old applets -- do they deserve a place in your RIA toolkit today?

1 2 3 4 5 6 7 Page 5
Page 5 of 7
Nimbus and hardware acceleration
In addition to focusing on JRE deployment, startup performance, JVM reliability, and other problems related to applet execution, Java SE 6 update10 focuses on making Swing-based UIs more appealing. It does this by offering Nimbus, a modern cross-platform Swing look and feel that improves on Swing's Ocean and Metal predecessors. Update 10 also offers a hardware-accelerated graphics pipeline based on Microsoft's Direct3D 9 API, which is intended to improve the rendering performance of Swing applications that rely on translucency, gradients, arbitrary transformations, and so on.

Wooing client developers to applets with JavaFX Script

JavaFX Script is another technology that factors heavily in Sun's client-side effort. It could also play a role in an applet comeback by making applets easier to write. The language is meant to simplify the development of Swing-based UIs by offering features such as a declarative syntax, data binding with incremental evaluation, and keyframe animation. I've written more about my own experience with JavaFX Script in the companion to this article: "The new applet experience," so here I'll just offer my question and the wide range of responses.

Q.Could JavaFX Script woo UI designers away from Ajax, Flex's ActionScript, and Silverlight's XAML?

Danny Coward: I think the language is way ahead of JavaScript or dialects of it like ActionScript in terms of what UI designers and developers need. Look, JavaScript is really popular for Web programming and has some awesome features like dynamic typing, but it wasn't designed with today's rich client applications in mind. If it was, it wouldn't be plagued by all the differing implementations in the browers for one. In fact, one of the cool things about NetBeans 6.1 is that with its new JavaScript editing support, it can detail which methods and features are available in which browser. It's a reality that the NetBeans team have addressed really well, but as a rich client developer, you just shouldn't have to worry about that matrix of features and when or on which browser you are or aren't allowed to use them in the first place.

JavaFX Script was created by Chris Oliver in reaction to his own difficulty creating lightweight, highly visual GUI apps on the Java platform. So from the ground up it was designed with those apps in mind. Animation support is part of the language [...] as are other features like data binding -- making it super easy to attach data to a visual element in an application, and properties -- making it very concise to create new visual objects.

And because JavaFX is built in Java, this is all running on our tried and tested JVM, its facile to use existing Java components or libraries from JavaFX Script. And with the new plugin architecture in Java SE 6 update 10, you can do things like drag running applets (written in Java or JavaFX Script) out of the browser and onto the desktop. Stuff that the other runtimes like AIR just can't do.

Romain Guy: JavaFX Script is an interesting language. It brings declarative and even functional programming to the Java world, which requires a mindset shift for many developers. JavaFX Script has two major issues to me. First of all, the language itself. Despite its qualities, the language is too foreign for most developers and is still evolving in major ways. On the other hand Silverlight relies on .NET technologies like C# and XAML while Flex relies on the well-spread ActionScript, which is very close from JavaScript. These languages are easier to learn and the skills acquired learning them can be applied to other products.

Then, there's the tools issue. JavaFX Script has a NetBeans plugin but you don't have a high-quality IDE as we have today for Java, C#, Silverlight, etc. Flex is not better in that regard but it offers a great visual builder integrated within the IDE itself. JavaFX Script doesn't provide anything that helps you create applications visually. Sun has promised tools targeted at visual designers but I highly doubt they will be able to deliver such tools quickly. Microsoft and Adobe (at least the Macromedia part of Adobe) have years and years of experience working with designers. Sun is a hardware and programmers company, not a designers company.

Chet Haase: New languages and platforms are funny things; they get adopted (or not) for all sorts of reasons. I think it's great that these kinds of facilities are being added into the platform so that they no longer have to be written from scratch. Heck, maybe we wouldn't have needed to write a book on how to do animated effects in Swing if they were that easy, or at least the book could have been a lot shorter. But there are other factors at play here, such as experience with the language, target market of the platform, existence of tools, and fickle whim. We'll see what happens when Java FX is final and developers and designers can really start hacking with it and releasing applications they've built.

Cay Horstmann: I asked just that question to Bob Brewin [a Sun Distinguished Engineer and CTO for Software at Sun Microsystems] a few months ago. "Bob, give me a reason why someone would switch from Flash to Java FX." He didn't pretend that there would be any technical or usability advantages (which I don't see either). He touted the fact that Java gives a completely open source solution, which appeals to large customers who like to be in control of their destiny. Very well, but aren't parts of Flex being open sourced as well?

There are reasons to use Java. A shop may just want to focus on Java skills rather than having to deal with the Adobe technology stack. Also, if you go beyond what Flash/Flex can do easily, then you fall off a cliff.

In my view, there are three ways to deal with this:

  1. Play to the strength of the Java market. Fix the Java language, API and tools to make client programming easier. Throwing yet another scripting language (FX) into the mix does not help.
  2. Compete like crazy with Adobe and Microsoft. Build up a competitive set of tools. But Java FX without rich media support is a non-starter. (Microsoft knows this -- they don't try to go head-to-head with Flash [yet], but they pitch the rich media capabilities of Silverlight and trot out NBC as a reference customer.)
  3. Offer something that is different and better. A simple way to write apps that work online + offline. Dev tools and frameworks that seamlessly produce Web apps + companion client apps. Web + mobile stuff that actually does something useful. Sun is far away from those, as far as I can tell. I raised the online+offline issue with the FX guys, and they effectively said "that would be nice, but that's not my department. Can I show you this cool transition effect?"

Ted Neward: I think in Sun's mind, JavaFX will be an equal competitor to ActionScript, XAML, XUL, Moonlight, or any other UI technology; I also think the community will more or less treat it as a non-entity, another example of Sun "throwing something against the wall to see if it sticks," like Sun has done with other technologies, like JXTA and Jini. Anybody else remember the Java Ring SDK that was the "hot ticket" many years ago?

Jim Weaver: I like the way that Josh Marinacci of Sun characterizes it: "JavaFX is sort of a code word for reinventing client Java and fixing the sins of the past." Some of the advantages of JavaFX are that you can instantiate, and call the methods of, any Java class. This means that any classes that exist in Java (e.g., middleware classes that handle the JSON protocol) can be leveraged by JavaFX. Therefore, developers that want to use rich-client Java will begin gravitating toward JavaFX Script.

John Zukowski: I've always viewed the Java programming language as just that, a programming language. People with a good background in computer science can do what they want with it and don't need something like JavaFX Script. To get more of a mass appeal and make the Java platform available for those without the core programming background, that's where things like JavaFX Script and all these other solutions come into play. There is nothing wrong with them. They work great for the right audience. I'm just not that audience.

Will it woo designers away from the others? I doubt it will woo anyone away from the others. What I can see is as more people need to choose a new solution from these three (and others), a portion of this new pool of users will gravitate to JavaFX script. Coming from a consultant background, it is hard to justify spending unbillable time learning something like JavaFX Script when you can get a reasonable rate using Flex or even Silverlight. Looking at a job board like Monster brings up one JavaFX post, 150-ish for Silverlight, and over 2500 for Flex, so there is definitely still strong demand for the others. Of course, if you are able to fill that one JavaFX job, perhaps you can charge an even higher rate.

1 2 3 4 5 6 7 Page 5
Page 5 of 7