The future is mobile…. soon. Lisa Awards: Best Comeback for a Programming Language
Feb 25

Swing is still drowning, and how it will be hard to get some air

Java, Tech with tags: Add comments

I have had several people comment on my view of Swing, where I claim it is drowning. Now some news is out in the public, I thought I would give more detail to my post.

Chet Haase came out telling people that he is now going to be creating Filthy Rich applications with Flex. His blog will be very interesting for Java developers who are interested in the switch as he himself learns the nuances of Flex, after many years in the land of Swing.

The core problem is that Swing hasn’t been updated much over recent years, especially in the area of productivity. Other companies are pushing the industry on giving you the appropriate tools for developing great user experiences, on their own platforms, and on the Web. This has never been a big push for the higher ups of Swing. Animations and flashy graphics have been relatively hard, even with some great work from the people within Swing.

So, Swing has been crawling along, and other platforms have been moving a lot faster in ways that matter. You could argue that JavaFX is a way to approach these issues, but is it too late? Also, people still equate JavaFX to JavaFX Script, and ignore the fact that you can do a lot of good graphics work in plain old Java.

If you keep going higher, you see that Sun is a hardware company that sells servers. They may have recently renamed the stock ticker to JAVA, but that doesn’t mean that they understand software. Within software itself, Sun hasn’t proven to do a great job on the client. Java on the client is a second class citizen.

Compare this to the competition. Chet moved to Adobe, and I am at their Adobe Engage event as we speak discussing their new Air 1.0 / Flex 3.0 launch.

  • Adobe develops platforms: PDF, Flash, Air
  • Adobe develops client software: Photoshop, Acrobat, Thermo, etc.
  • Adobe is investing in having its own applications running on its platforms

They are doing this slowly. Photoshop on the Web will probably take a little bit of time, and there is a lot of work thinking about the business models, moving to services vs. shrink-wrap, for example.

Then you take Microsoft, who obviously both build the platform and many applications. Ditto for Apple. Sun is the odd one out here.

Oh, and I haven’t even gotten to the Web platform, and how a huge number of people just want to migrate over there.

The fact that Sun doesn’t developer client software and isn’t investing half as much in Swing as the other platforms are make me conclude that without a huge turn around, Swing is drowning.

21 Responses to “Swing is still drowning, and how it will be hard to get some air”

  1. afsina Says:

    Chet is only one engineer, and I doubt that his move is related Swing’s “drowning” . Also, come on.. Adobe still charges $$$, and almost zero open source commitment.

  2. ocean Says:

    Well, your logic is pretty flawed. A quick review of the change notes for the JDK demonstrates that Sun is steadily making the desktop experience better and better. Matisse is also a game changer when it comes to building big, maintainable Swing applications. I’ve personally used Matisse to bang out two or three pretty sophisticated swing applications and it’s wonderful. Based on anecdotal experience I can say Swing is still pretty popular in backoffice and on trading floors. (Indeed I remember reading just last year that Swing was the most popular desktop api in use but I can’t find it now.) There’s still obviously much interest in Swing based on the blogosphere and jobs.

    Saying that Swing is “drowning” is nonsense. (Literally, I have no idea what you might mean by it.) Sun probably could demonstrate more transparent leadership but I suspect, at this point, even Sun isn’t totally sure what the future of Swing is and so can’t provide the most effective guidance. Either way there’s still plenty of developers using Swing. It’s not flashy or whizzbang as newer platforms but for banging out straightforward business applications in Java it works quite well.

  3. foo Says:

    It doesn’t matter how revolutionary Matisse is: as long as it only runs on a dead IDE such as NetBeans and that it doesn’t let you edit all of the generated code, it will be a non-starter for 99% of the rich client projects out there.

    Seriously, the locked portions of code were solved by OOP 20 years ago (just generate the code in base classes and let users extend them), what were the Matisse engineers thinking?

    As for JavaFX, I haven’t seen it anywhere (except on the blog of someone who wrote a book about it).

    Dion is right: Sun doesn’t know how to do write software in Java.

  4. Ben Says:

    We have a massive swing legacy and are porting everything to web (gwt) or flex. I love swing, its amazing, and is still more productive than the others, but lacks the “whizz bang” and simple customisation that the others do. The new nimbus LAF is by far not enough, and is still by programmers for programmers – its UGLY compared to flex.

  5. Ben Says:

    By the way, I mean UGLY by meaning it wasn’t designed by a designer, but by a programmer. That never turns out well.

  6. Romain Guy Says:

    Funny you say that because Nimbus was created by graphics designers, for Sun… And as much as I like Flex I never found its default look particularly beautiful. I actually find Nimbus and Flex quite similar in terms of looks.

  7. LarsW Says:

    >It doesn’t matter how revolutionary Matisse is: as long as it only runs on a dead IDE such as NetBeans

    a) Netbeans is alive and well.
    b) Eclipse liked Matisse so much they included it in their platform too.

    Enough with the fear mongering.

  8. JBL Says:

    Hello,

    Having use Flex for one year and Swing some years ago my opinion is that Flex has effectively some advance in terms of nice graphics and animation management. And is surely simpler to handle for a newcomer (less verbose). But it also has some drawbacks when used for real world applications : small external librairies, no integration with native code (think MS Office), no threading mechanism and sometimes stability and performance.

    It is a real threat for Swing as it is currently charming java developers and Sun has not yet crafted an answer as seducing. And Flex can move really fast as Adobe is alone to drive it as opposed to Sun with the JCP process which is a way longer to bring new stuffs.

    JB

  9. James Strachan Says:

    In an ideal world, we’d put WebKit (as its small) or Gecko into the JDK and just use GWT as the long term replacement for Swing.

    Then folks can use nice HTML/CSS markup to create awesome UIs, use DOM/JPG/PNG/Flash where required – and Java to write the model/controller code.

    Then either deploy the same code as a stand alone rich client – or deploy it as a web app (turning the Java into JS).

    We can but dream – but then I don’t see Sun really doing anything revolutionary in the UI space…

  10. Jesse Kuhnert Says:

    @Romain
    I’ll understand if you don’t want to answer this question – but I wonder if swing itself isn’t the reason swing might be drowning?

    I have to imagine that the internal call “for rewrite” of systems that most developers experience after learning their mistakes from the last system is common even for sun employees working on the jdk. It’s easy to imagine that your work on the Android UI might represent more of this ideal UI world that you weren’t allowed to create working on swing directly – because those kinds of changes wouldn’t be backwards compatible. (or similar reasons that may be true but still stuck big time for the developers who care and maintain the API’s)

    This all sort of relates (in my mind) to the recent closure debates in java as well. Just as it is hard to experience driving a lamborghini around and continue to find joy in slipping back in to your hyundai (even a tricked out hyundai, which you may or may not be picking up a nice lady named jenny in – and possible her sister).

    I don’t know. It seems like we have acquired lots of great knowledge on writing good software / everything else in our industry but no one has really addressed this whole issue of stagnation and resistance to change – which seems to be constantly caused by the whiny hoards of corporate drone developers with XX amount of countless dollars invested in their software…

    Bleh….this stuff is frustrating

  11. Marcus Says:

    Seems like a post containing completely unsubstantiated subjective reasoning and a title designed purely for Digg value.

    Come on! At least pretend to be objective and make a case!

    I’m not affiliated with Sun at all, and I don’t write desktop applications so I have no axe to grind, and a quick review of Sun’s *actual* activity in the space will show you that Netbeans has had such an influx of investment that it is clearly a flagship product now, and is an excellent showcase of a beautifully written Swing App. Additionally the strategic decisions being made appear to cross all boundaries into all aspects of the JDK:

    – Significant investment and effort is being put into JDK 6 Update N, designed to make applets actually work well in the browser for a change. Sounds pretty good to me, considering I happen to think Adobe’s tiny gestures toward open source are not nearly as good as Sun’s

    – JavaFX is one approach toward making Flash-like interaction in an applet. Sounds pretty needed to me, not to mention, sounds like a big investment. It’s a pretty unusual approach using the declarative language, so I’m quite interested in the outcome. But I do find the critics appear quite fast to quibble with the declarative syntax without really addressing the substance of the approach, which is what is interesting about it

    – As a daily user of the latest Eclipse, my subject opinion on Swing vs SWT is that Swing is really the place to be right now, but them’s fighting words. Let’s see who decides to respond that their subjective opinion is more valid than mine, heh

    – There has been what can only be considered a massive investment in Nimbus. Stop and think about it for a sec: A pure vector UI widget library! Now that’s interesting! One commentator doesn’t seem to like it, but my subjective opinion (again) is that it seems pretty nice, and I want to write desktop or mobile apps to try it out and learn just how good it is

    It is clear that the competitors in this space are “pure” web, GWT, Silverlight, Flex/Flash, and when released, JavaFX/Applets. If Sun didn’t have a horse in this race then I would be worried. But that’s clearly not the case. And the work on Netbeans is clearly showcasing Swing development.

    Of course, maybe you’re one of the peeps complaining about the look and feel quality while simultaneously running some obscure window manager on a Linux distro with 17 users, in which case its probably good that you’d like to restrict your development activity to Adobe’s stuff, presuming Adobe actually releases a version for Linux within 2 years of the Windows and Mac release. Good luck ;-)

  12. Vic Says:

    Java is OK w/ add on of:
    http://www.jgoodies.com/products/details.html

    The difference is deployent, Adobe and MS Sliverlight, each help you deploy direct, while Sun instead expects each developers to deploy the run time from developers web site. In Flex, there’s java script that redirects to Adobe web site to get the update. W/ Java applet, each developer is expected to host java exec for download w/ the Sun provided javascript on developer web site, not from the Sun web site. (even then, the # of pop ups to install jre is huge, and some corporate admins ban installation of jre from the web, especially that jre was not downloaded from Sun.com )
    This is why end users have easier time deploying Flex applets and that is why there is a bigger market of Flash or Sliverlight end users.
    Since there are more end users … developers follow. Who cares which is better, which one makes it easier for end users?

    Java applets are drowning.

  13. Mark Says:

    “but is it too late? ”

    It’s always too late. Comebacks are rare and far between. Java has it’s place, but I doubt the desktop is going to be one of them.

    That said, I’d love for the “N” update to be the spark that ignited a revival, but who’s holding their breath?

    JavaFX was just a rebranding of a pet-project as a rapid response to Silverlight. It’s pretty much DOA

  14. merys Says:

    very good
    buy xanax

  15. felix za cat Says:

    Swing is drowning? It has its place, which is the most used rich client technology. Ajax, air, and all those gadgets may have their place in terms of rich internet apps, but if you want something REALLY sophisticated, it needs to break out of the browser and onto the desktop.

    Swing (and to some degree SWT and Winforms) offers a pure OO environment therefore : extensibility, maintainability, robustness, the power of multi-threading, all the awesome Java language features.

    AJAX (and all associated Web 2.0 techonology) offers, a messy stack of gadgetry and gimmicks, that is great for doing apps like Facebook and mail programs etc. It will never achieve the sophistication of Swing. For example : can you imagine building IntelliJ/Netbeans in AJAX? You might get some brittle immitation. A bit like Writely is to Microsoft Word.

    BTW – Can someone explain to me what the point is of having Photoshop in a web browser? If you want to have web interaction, build a desktop app and connect that to the web. Inserting a rich app like Photoshop inside another app (ie a browser), reeks of idiocy. There is no point to it. You lose real estate with the browser buttons at the top, and, i repeat, what is the point? You don’t ‘browse’ a Photoshop session. You USE it.

  16. chris Says:

    Well Swing is drowning…. (… what a comparision ;-/)

    Maybe, but i don’t really care, in that case I live a fine life of an amphibian.

    I really see it the other way around:

    Swing is in it’s core quite a mature technology. Ok you need something like rpc. You’ve some choice there, for example eclipse and http://www.jgoodies.com/downloads/products.html. Both very good products and valuable alternatives for who still believe in

    a) The rational for Desktop Applications
    b) Doen’st want develop against “Native” Api’s

    On the otherhand, whats going on in the webspace is for me largly very irrational and defies any real need of customers, consumers. What’s going on in the Webspace is not so much addressing requirements of the enterprise, that just a gigantic fight over who “own’s” the computing space: OS vs Browser , Microsoft against the Rest (Google, IBM, Adobe etc). A hype to channel the Enterpises money.

    Ria Technologies have the one goal:

    Provide the Richness of a Desktop application.

    A goal which it largely fails to achieve. And never will (… why, ok, here a heated discussion follows, about architectural issues, distributed computing, architectural constraints etc…..)

    But, summa summarum:
    The Web is slow, getting overly complex, expensive to develop, running after irrational goals.

    Flex Applications just make me as a user sick, beyond the first (short) coolness factor….. Using Flex or Ajax Applications (Google Office Suit for example), i really understand, why people are still largly buying Desktop Operating Systems.

    Well, if Swing is drowning …
    Ria (Ajax, Flex, ….) is the one living proof a Lemming effect: irrational

    Just my five cents….

    Ok, i would love to see a little more attention of the “Java Community” to the Desktop.

  17. matt Says:

    some of these comments are insane:

    “In an ideal world, we’d put WebKit (as its small) or Gecko into the JDK and just use GWT as the long term replacement for Swing.”

    You must be joking. I have never found a single browser based application that can do a sophisticated task like text editing or SVN history diff better than a desktop equivalent. Even billions of $$$ from Google and friends can’t make a Mercedes out of a Yugo.

  18. javacommunity Says:

    There is no need to debate wether Flex is better or not.
    Either you want :
    -your application to run on ANY computers (with java vm installed)
    -your application to look good (with flash vm or AIR vm installed and a specific os+specific processor (multi-platform/multi-arch doenst mean the same for adobe and for computer scientists^^ Working for most of the stuff and on most of the computer doesnt mean it works multi-platform/multi-arch^^)

    PS: with jigloo you can design wysiwyg in eclipse.
    And yeah, netbeans sux, try to avoid it!

  19. javacommunity Says:

    The real debate should be why are we still using flash anyway? it sux and only profits to adobe (neither end-users or dev gets real advantage of it beside lnf) and ad-banner^^…

    PS: acrobat reader sux, try to avoid it!!!

  20. javacommunity Says:

    Final word: Oracle rules in the business industry !!!!!!!!!!!!!

  21. John Mac Says:

    The only threat to Java Swing, is SWT

Leave a Reply

Spam is a pain, I am sorry to have to do this to you, but can you answer the question below?

Q: Type in the word 'ajax'