InfoQ

News

Bruce Eckel: Use Flex as the UI for Java Applications

Posted by Rob Thornton on Jan 31, 2007 12:30 PM

Community
Java
Topics
Rich Internet Apps,
Rich Client / Desktop
Tags
Flex,
Adobe,
Flash

Bruce Eckel has written about the future of user interfaces in Java. He reviews the state of Rich Internet Applications (RIAs) and states that while Ajax helps, a language designed for user interfaces and rich media is what we need. He proposes that we stop trying to use one language (Java) to solve all of our problems , and instead use Flex and Apollo as a front-end for systems written in Java (or JRuby, Groovy, Scala, etc).

Eckel writes that programming for the web is not working, because current RIAs do not "work well". Developing with the combination of HTML, CSS, and Javascript is expensive and hard to make cross-platform. He points out that one of the biggest gains from the Ajax trend is that the toolkits that have surfaced abstract away the cross-platform problems. However, Ajax is not enough. Eckel states that Ajax is reaching its limit:

We do see relatively amazing Ajax-based tools like GMail and the other Google tools which are slowly seducing me (but I repeat: it took Google to create those, not Joe garage-programmer). Very nice, but is this the best you ever want to see on the web? You're seeing, if not the limit, then very close to it in those applications, and even then they don't work consistently.

Eckel says that one of the reasons Ajax has become popular is that it solves the installation problem. Java started on the internet with Applets but failed, among other reasons, because installing the JRE was so difficult. While Javascript has its own problems, it is already installed. Further complicating GUI development in Java is the lack of good media support. In the end, Eckel says GUI applications in Java is too hard.

It's not impossible to build GUI applications with Java, but it's been 10 years and there are still installation hiccups with applets, Java WebStart, and regular applications. After 10 years, people don't trust it anymore. If it's not there after 10 years, then I'm going to go out on a limb and say that someone doesn't consider this problem important enough to fix.

Eckel proposes Flash, and Flex in particular, as a UI library for Java, both for RIAs and for desktop applications. Installation is trivial, high quality UIs are easier to develop than in Java, Flex is no longer expensive, and Flex was created as a DSL for user interfaces. In the end, Eckel says marrying Flex with Java might be the best way to deliver cross-platform applications with high quality UIs:

You don't insist on using a Java database for an application; you use a specialized system like MySQL or Oracle. Sun is directly supporting the development of JRuby for hybrid Java/JRuby programming. We are seeing other special-purpose languages arise to solve specialized problems. Why insist on using a Java library for UI if a specialized system solves the problem better?

Paul Brown responds that he thinks Flex might be a step in the right direction but the problem to focus on is graceful degradation to HTML. With the growth rate of new mobile devices and platforms to view the web, the ability to get back to the common denominator is necessary.

Eokyere agrees with Eckel and hopes that the open source community will get involved with Flex, perhaps in working on an open source alternative to Flex Data Services.

16 comments

Reply

Pricing by Corby Page Posted Jan 31, 2007 1:05 PM
Re: Pricing by Stefan Tilkov Posted Jan 31, 2007 1:53 PM
Re: HTML UI + Javascript/Ajax is an excellent solution for 80% use-case by Cyril Gambis Posted Feb 7, 2007 3:47 AM
Re: Pricing by James Ward Posted Jan 31, 2007 2:25 PM
Re: Pricing by Raghu Madabusi Posted Jan 31, 2007 7:17 PM
Re: Pricing by Stewart Robertson Posted Feb 1, 2007 1:03 PM
Re: Pricing by James Ward Posted Feb 1, 2007 2:18 PM
Re: Pricing by Stewart Robertson Posted Feb 1, 2007 2:24 PM
Why would I want to lock into a proprietary solution? by Marc Stock Posted Jan 31, 2007 2:56 PM
Re: Why would I want to lock into a proprietary solution? by Corba The Geek Posted Jan 31, 2007 7:23 PM
consultant in search of a subject by Joost de Vries Posted Jan 31, 2007 4:11 PM
Re: consultant in search of a subject by James Ward Posted Jan 31, 2007 4:49 PM
Why not... by david m Posted Jan 31, 2007 7:13 PM
Flex for UI as an option to AJAX UI library by claude hussenet Posted Jan 31, 2007 8:31 PM
Thick clients can do more than the GUI ... by Ashley Aitken Posted Jan 31, 2007 11:41 PM
OpenLaszlo is the way to go! by Sébastien Arbogast Posted Feb 1, 2007 2:12 AM
  1. Back to top

    Pricing

    Jan 31, 2007 1:05 PM by Corby Page

    Flex is no longer expensive
    I'd like to verify that we are no longer looking at $10,000 per server deployments, but it's pretty hard to. Asking a Flex advocate about pricing always degrades into a bunch of hemming and hawing and 'free for development' and 'cheap for most uses'. I look at the Licensing and Pricing section of Adobe's Flex FAQ. There are no numbers, except for the phone number to talk to sales. Even if the dollars are now reasonable, I now know that I have a new third party Licensing/Sales Consulting bureacracy that has to be managed for deployments in any reasonable-sized enterprise. I've been consulting for too long to go down this road. I'll be sticking to something a bit more open for core UI infrastructure.

  2. Back to top

    Re: Pricing

    Jan 31, 2007 1:53 PM by Stefan Tilkov

    IMHO, the necessity for "rich" UIs is vastly overrated. A well-designed HTML UI that uses Javascript/Ajax only as an additional option (i.e., degrades gracefully) is an excellent solution for the 80% use-case.

  3. Back to top

    Re: Pricing

    Jan 31, 2007 2:25 PM by James Ward

    Hi Corby, Here are the exact pricing details for the whole Flex product line: http://www.adobe.com/products/flex/productinfo/buy/ Many companies have been very successful with Flex using only the free Flex SDK, which is free and doesn't have any hidden runtime fees. Free as in free. :) Hope that helps. -James

  4. Seriously, did everyone get the memo but Eckel that locking yourself into proprietary solutions when FOSS/open standards solutions exist is a bad plan? I am no open source bigot -- I buy more software tools than anyone I know but I just don't get the point of using Flex. I think Eckel has become obsessed with the "ease" of everything to the point of exclusion. Just because something is easier to do does not instantly make it better.

  5. Back to top

    consultant in search of a subject

    Jan 31, 2007 4:11 PM by Joost de Vries

    Ha, so Eckel has worn out Python as a subject so a new programming model is needed?

  6. Back to top

    Re: consultant in search of a subject

    Jan 31, 2007 4:49 PM by James Ward

    Haha. Actually Bruce and I recently recorded a screencast about using Python & Flex together: http://www.jamesward.org/wordpress/2007/01/10/bruce-eckel-is-thinking-in-flex/

  7. Back to top

    Why not...

    Jan 31, 2007 7:13 PM by david m

    MS Sparkle? I hear it will be better than Flash. Or VRML. It's had time to mature, and I hear there's a netscape plugin. Please, keep me away from web sites this person develops. HTML is a great thing, no matter how bad it gets.

  8. Back to top

    Re: Pricing

    Jan 31, 2007 7:17 PM by Raghu Madabusi

    How about Laszlo(http://www.openlaszlo.org), an open source platform for RIA. I have developed an application with Laszlo and it was quite impressive. Raghu

  9. There are open source alternatives to Flex that also use the "free, if proprietary" Flash plugin... Like OpenLaszlo. The main plus of "Flex" is the use of a commonly available, easily installed VM; i.e., Flash. If you're not willing to use proprietary development environments like Flex, you might be more interested in OS solutions like Laszlo (which have been around about as long as Flex). Check out www.openlaszlo.org.

  10. Back to top

    Flex for UI as an option to AJAX UI library

    Jan 31, 2007 8:31 PM by claude hussenet

    I have personally evaluated Flex 2 SDK, Flex 2 Builder(Flex eclipse pluggin) and Flex chart for an internal project. I was very impressed by the quality of the UI libraries,the extensive documentation (API, Reference manual,examples),a very active mailing list (too active :-) ) an openness to AJAX/Javascript through a AJAX/FLEX-FLASH Bridge that for example Google is using for their finance chart After starting using Flex SDK is quite tough to go back to PROTOTYPE, SCRIPTACULOUS ,DWR, GWT, DOJO world.(Great js libraries or toolkits by the way) I believe that people should download the SDK with the trial version of the eclipse pluggin and test by themself that web development can be painless using tools such as a powerful debugger Regards Claude Hussenet

  11. Back to top

    Thick clients can do more than the GUI ...

    Jan 31, 2007 11:41 PM by Ashley Aitken

    One of the things that I believe this discussion misses (at least for some apps) is that a thick client can do more than just the GUI. For example, it can do client-side business processing (saving the results to the server at a later point) and off-line processing (in some circumstances). A big benefit from using the same programming langauge on the client as one uses on the server is that you can share various business libraries (or parts thereof) across the server and the client. This way we don't have the duplicate business logic like we have had in the past or with Flex on the client and Java on the server. Of course, some apps don't need this sort of client-side processing but some could benefit a lot from it. Cheers, Ashley. -- Ashley Aitken Perth, Western Australia mrhatken at mac dot com

  12. Back to top

    OpenLaszlo is the way to go!

    Feb 1, 2007 2:12 AM by Sébastien Arbogast

    I definitely encourage you all to have a look at OpenLaszlo, especially the next version soon to be released, OL4, which has what no other RIA platform offers: multi-runtime support. In other words, you create all your UI with one common language (LZX) and it can be deployed with Flash (Flash 9 support is on its way) OR AJAX... or anything you want. And their documentation is great, honnestly they lack a few small things compared to Flex, but hey, it's Open!

  13. Back to top

    Re: Pricing

    Feb 1, 2007 1:03 PM by Stewart Robertson

    However from my understanding from looking at the flex site if you are ISV then you have to pay licensing fees for using flex even if it is just the SDK without Data Services. So hypothetically if I am Application Service Provider (ASP) making available a Basecamp (37 Signals) type application that uses flex then I need to pay licensing fees. Is that correct? Below is the quote from the flex page...

    For ISVs that develop software applications for sale that are built on or embed Flex, an Adobe ISV support plan and/or OEM license and redistribution agreement is required. Flexible licensing and value pricing options are available for Flex OEMs and ISVs.

  14. Back to top

    Re: Pricing

    Feb 1, 2007 2:18 PM by James Ward

    There are very few instances where someone needs to redistribute the Flex SDK. Anything you build with the SDK is not under any license restrictions. Just like the stuff you create with the JDK.

  15. Back to top

    Re: Pricing

    Feb 1, 2007 2:24 PM by Stewart Robertson

    Well that's good news. Thanks for the info.

  16. IMHO, the necessity for "rich" UIs is vastly overrated. A well-designed HTML UI that uses Javascript/Ajax only as an additional option (i.e., degrades gracefully) is an excellent solution for the 80% use-case.
    We are speaking about the future of UI (Web or not). A monochromatic screen is an excellent solution for the 80% use-case too, but the additional possibilities of a color screen are very welcome for 100% of the applications. HTML+AJAX/Javascript is okay for current applications, but we are seeing the limits of these technologies. I totally agree with Bruce Eckel on that point. Another idea would be GWT direct support for Flash rendering; it would be possible since GWT compiles Java to HTML+Ajax/JS. And as the next version of OpenLaszlo, it would offer different rendering for different devices/platforms. But I totally agree with Bruce when he writes that Java as a technology to design GUI is not a very good solution. Cyril

Exclusive Content

Agile in Practice: What Is Actually Going On Out There?

Scott Ambler talks about actual data resulting from surveys made during 2006-2008, showing how Agile is perceived and implemented within organizations.

Building Smart Windows Applications

From QCon 2008, Daniel Moth presents on using Visual Studio 2008 and .NET 3.5 to create compelling rich Windows applications.

Joshua Kerievsky about Industrial XP

Joshua Kerievsky, founder of Industrial Logic, talks about Industrial Extreme Programming which extends XP by including practices dealing with management, customers and developers.

Jeff Barr Discusses Amazon Web Services

Amazon Web Services (AWS) Evangelist Jeff Barr discusses SimpleDB, S3, EC2, SQS, cloud computing, how different Amazon services interact, origins of AWS, AWS globalization and the March AWS outage.

More Than Just Spin (Up) : Virtualization for the Enterprise and SaaS

Cloud services have helped bring virtualization to the forefront. Its full power however, also includes other benefits such as high availability, disaster recovery, and rapid provisioning.

Ruby Beyond Rails

John Lam talks about his path to dynamic languages, some of the problems of making IronRuby run fast, and how the DLR helps with implementing languages.

VMware Infrastructure 3 Book Excerpt and Author Interview

VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide provides a wealth of practical insights into setting up virtualization in todays corporate environments.

Architectures of extraordinarily large, self-sustaining systems

Can a system that is so large it cannot be comprehended be "designed" in a conventional sense? The foundations of computing are about to change. In this talk, Richard P. Gabriel explores why and how.