I've been a zone leader with DZone since 2008, and I'm crazy about community. Every day I get to work with the best that JavaScript, HTML5, Android and iOS has to offer, creating apps that truly make at difference, as principal front-end architect at Avego. James is a DZone Zone Leader and has posted 639 posts at DZone. You can read more from them at their website. View Full User Profile

Making the Right Choice For Your User Interface

  • submit to reddit

Among developers, the decision of what user interface technology to use is always a biased one. I, as an Eclipse enthusiast, will almost always go for an Eclipse RCP based application. I'll say that it's faster to develop, I know the technology quite well and as it's my "expert area" it's where I'm more comfortable. 

Of course there are applications where just SWT or Swing would be a better choice, but I'm still more inclined towards Eclipse RCP. It's a flawed decision model though, and I'm sure most of you see yourselves biased in your technology decisions. 

Right now I'm working on an RCP based Twitter application. It's fun, and one of the things I'm trying to do is to push RCP and make the applications interface look more advanced. The best way to describe what I want the UI to be, can be summed up in three words: more like Flash*

How many of you have found yourselves in this situation? Writing a user interface, getting the functionality pretty much ok, but not being able to go that last 5% because of the choice you made at the beginning? Would it have been better if I chose Flash/Flex/AIR?

Bruce Eckel outlines the importance of choosing the right client side technology brilliantly in his latest article, Know Your Materials. As the article is geared towards web UI's, it really focusses in on the traditional HTML/CSS/JavaScript formula, and the three RIA contenders - JavaFX, SilverLight and Flash/Flex. The trick here is that you really need to consider what's cross platform. In summary, Flash/Flex solutions win out as most people already have Flash installed. JavaFX has the Java install going against it, while SilverLight is focussed on working on MS browsers right now.

The most interesting part of this article for me, was the quote from a developer who typically built their web applications on Struts, JSF and Spring MVC, who has now moved to Flex for the UI development: 

As for the technology stack, we're using the new Spring-Flex thingy to expose our spring POJO's as Flex destinations, and the Swiz framework helps us do a clean(er) job in Flex.

...productivity has been great so far and our burn-down is telling us we're pretty much on track.

So I hope this turns out to be a success and that we can do some more projects where we can use Flex as the front-end.

It's an interesting turnaround for these guys. These days we need rapid application development, but even more importantly, what we ship first needs to please the customer. It's refreshing to see developers stepping out of their comfort-zone, and using a technology that they might not have used before. Of course, these decisions can't be taken lightly - a certain amount of analysis may be required before you go messing around with your company's technology stack. 

There's a few points to take away from this, and Bruce's article. The usual question comes up - which RIA technology is best, and will JavaFX ever be able to compete with Flash/Flex. To that, we'll have to wait and see, but I do believe that JavaFX can slowly start to make some ground in the RIA space. 

Secondly, if you're honest how biased are you in your technology decisions, and have you found yourself wishing that you had made a different decision? If you were to write a web application right now, would you stick to the usual Java framework choices or would you consider Flex on the UI (or maybe even JavaFX)?  

*By the way, TweetHub is an experiment in RCP and other Eclipse technologies, so a biased decision is the right way to go here. Especially as it's not a commercial product. 


Clemens Eisserer replied on Fri, 2009/08/14 - 8:47am

Well, Bruce is a paid advertising guy for Adobe, so read his articles with appropriate distance.

Kevin Daly replied on Fri, 2009/08/14 - 9:41am

Just wanted to point out

You've mentioned Eclipse, Flex & JavaFX for your RIA, but what about GWT. GWT with SmartGWT or GWTExt are excellent choices for developing RIAs as well and should also be considered, as well as the Netbeans RIA framework..

Arrg... I sometimes hate Java... too many choices...

Sometimes I wish I was a .Net developer, then it's just WPF and Silverlight ;)

Kevin Daly replied on Fri, 2009/08/14 - 9:44am

Oh lets not forget Pivot.. Lost in all of the hype is the excellent Pivot framework!


James Sugrue replied on Fri, 2009/08/14 - 9:59am in response to: Kevin Daly

Hi Kevin, thanks for those additions.

I guess I proved my point about bias by not including GWT, Pivot etc. GWT definitely deserves a mention. 

There's certainly a lot out there.

Vincenzo Caselli replied on Fri, 2009/08/14 - 10:35am

Hi James,

we also are using GWT with great success since about 2007. Now we really can't imagine to go back to other classic technologies (JSF or similar), nor to look for other RIA solutions (Flex or JavaFX).

With GWT you can obtain so easily a rich interface user experience, you can debug the Java code of your UI and no plugin is needed on the user browser, can you imagine more?

Anyway great article, discussing about UI technologies is always a challenging debate.

Mike P(Okidoky) replied on Fri, 2009/08/14 - 11:53am

No chance that you could take it to the next level and use Webstart to deploy an actual desktop application instead?

I've used Webstart every time for all projects I've worked on since 2000 I think (when did Webstart come out?). These are company intranet and controlled customer scenarios though.

It's just that I'm so sick and tired that we have to always shoe-horn everything into the browser.

And as if it's not bad enough, Google OS will be all browserish, and the Palm Pre is going the dhtml style too. I think we'll never get where we really want to be unless we ditch that darn browser for once and for all...

James Ward replied on Fri, 2009/08/14 - 1:14pm in response to: Clemens Eisserer

Bruce said back in July:

 I consulted for Adobe on Flex for about a year, but that contract ended over a year ago

James Sugrue replied on Fri, 2009/08/14 - 1:27pm in response to: Vincenzo Caselli

Thanks Vincenzo,

GWT is one of those technologies I've read a lot about, but never got to use in an application. Maybe it's time I gave it a go. 


James Sugrue replied on Fri, 2009/08/14 - 1:29pm in response to: Mike P(Okidoky)

You raise an interesting point Mike. We do seem to obsess about keeping things inside the browser. But I guess this trend is for a good reason - are the general public, who use our applications, wary of things that install onto their desktop from a weblink?

Mike P(Okidoky) replied on Fri, 2009/08/14 - 1:36pm in response to: James Sugrue

What might be a salvation is that (I've read) that the latest greatest Java has detached the JVM from the browser. Up to this point, applets have always been unstable. They'll just hang, get stuck, or break. Each and every day. If now, finally, it's stable, then, how about an applet that takes up the entire size of the browser window, and do *all* your stuff in Java. No html, dhtml, css, or any other ancient crap like that (no offense).

Apparently, you can even use JOGL inside the sandbox, allowing for actual OpenGL acceleration without the user having to bless the application. One could create eye candy that would put Adobe to bed in the hurry. What's taking people so long ;-)

Shay Shmeltzer replied on Fri, 2009/08/14 - 2:08pm

The problem with Bruce's approach is that he is comapring css/HTML/Ajax as though the developer is writing those by hand. I would agree that wasting time on this low level coding if your goal is to write an application is stupid.

A smarter solution would be to use existing components that give you the UI functionality you want and are already built to solve the cross platform issues. For example you could be using JSF and pick up one of the set of Ajax enable JSF components (such as Oracle ADF Faces) and then you don't waste time on the low level/cross browser issues.

Then the discussion becomes what underlying architecture is better for your application scalability and performance - and you then run into questions such as what runs faster in your browser a flash/JavaFX/Silverlight UI that requires an external plug-in or a native HTML/Ajax solution.

One trend that you can see in many browsers today is that the Javascript/Ajax engines they provide are becoming much faster with each new browser release.



Mike P(Okidoky) replied on Fri, 2009/08/14 - 2:16pm in response to: Shay Shmeltzer

I'd like to think of the browser as a virtual machine in itself. What runs inside a browser can be hand crafted, created with a wysiwyg, or you can compile code for it.

There's the thing: the JVM is a much better virtual machine that the browser.

So why are we confined to this crappy browser VM for ever and ever and ever, it never seems to end.

Greg Brown replied on Fri, 2009/08/14 - 2:46pm in response to: Kevin Daly

Hey Kevin,

Thanks for mentioning Pivot! Sometimes I'm a bit reluctant to comment on entries such as this because (as one of Pivot's creators) I don't want to seem like I'm pushing it too hard. So I'm always happy when someone else mentions it first! :-)


Kevin Daly replied on Fri, 2009/08/14 - 7:54pm

I've basically publically endorsed Pivot, GWT and JavaFX in the past. I'm not a huge fan of Flex due to the fact that I don't think the Flash Player was ever really designed for creating GUIs and RIA's.If I'm going to have to rely on a Plugin, I'm going to go with the JVM (Pivot or FX) any day over the Flash plugin.

I'm using GWT right now, and I'm very impressed with it. I might use Pivot in the future, but I'm not sold yet on using Plugins in the browser (sorry Greg).

I think the Google & Mozilla are pushing the browser in the right direction and with GWT, it is completely possible to create a compelling UI that runs in the browser with no plugins and is completely cross platform (use SmartGWT since default GWT is ugly)


Jose Maria Arranz replied on Sun, 2009/08/16 - 9:28am

@James Sugrue: It's refreshing to see developers stepping out of their comfort-zone, and using a technology that they might not have used before

You will ever feel confortable when you only deal with ONE technology and implementation including web, if you design for the same browser you feel confortable too :)

The web is a very exigent area, because we, developers have "auto-impossed" the rule our web must run fine in ANY browser, this requirement is extreme because web standards are not fully respected.

Flex, Siverlight and JavaFX seem so "compatibility problem free" because they are using only the browser as a launcher.

We could develop an ActiveX for MSIE just designed to launch the appropriated browser, in fact, this is the solution used by Flex, Siverlight and JavaFX  :)

Seriously, I can't understand WHY, OH WHY, this ActiveX is abandonware:


"Mozilla ActiveX Control

Embed the Mozilla browser engine (Gecko) into any ActiveX application. This control implements  the same APIs as the Internet Explorer control making porting of existing applications reasonably straightforward."

In summary: you can use FireFox to render a web page on top of MSIE.... all your compatibility problems are gone!

I'm not kidding I can remember McAfee's web site using a Netscape plugin for the opposite (many years ago), the IE was used to render the web page on top of Netspace 4.x browsers... What is the difference with Flex, Siverlight and JavaFX? 

Fortunately today we don't need plug-ins to deal with the web diversity because web frameworks (client and server based) are doing an amazing job hidding web inconsistencies. 

Finally I think you are missing the emerging mobile world, and this world is becoming more and more and more... web based. The mobile web ubiquity cannot be achieved by any other technology including JavaME, because JavaME is mainly used for offline and already installed applications.

And now we have the technology (ItsNat) to deal with the myriad of mobile browsers :)

and to be fair, IceFaces is doing a good job in mobile too, in fact only today only server centric frameworks can work fine on the mobile web.

In summary if you want to develop with the same User Interface technology in desktop and mobile trying to achieve MAXIMUM ubiquity, there is only one option and is WEB!

And web technology is becoming more and more capable and exciting, Opera (including mobile versions), WebKit browsers and FireFox are doing a great job!




David Mach replied on Thu, 2009/08/20 - 7:26am in response to: Clemens Eisserer

Bruce is primarily C++ and Java developer. He's just often thinking about RIAs where is Java weak and Flex/AIR platform is more useful...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.