javaswinguser-interfacedesktopthick-client

Converting an existing web app to desktop application


I saw some other similar questions on this topic here but they were not very helpful so I a posing this question.

What is the fastest way to convert a reasonably sized, simple web app to a Java desk top based client targeted for pc and mac? Unfortunately I can not share a whole lot of details about the app here due to various reasons. The most complicated UI in the app though is a page that contains a multi level threaded discussions (please see here for an illustrative example of what I am talking about.) The current web app is based on python so I can not re use anything from the server side code (dont think this is an issue)

I have never done any swing or awt or any other Java based thick client GUI work. My thinking is more or less defined by web based applications. I am capable of doing end to end web app development (including backend and decent UI using HTML, CSS and JS) using Java or python. For your answers please focus on Java solutions only.

So here are my questions What is the best framework or tool I should use? I found some of the following tools on the web as part of my research.

  1. Awt - does not look like this is a good choice.
  2. Swing which I believe is bundled with regular Java SDK/JRE. - This may be my best bet.
  3. SWT which seems to compliment Swing in some fashion.
  4. Griffon based on an article here. This framework uses Groovy ( I have no clue about Groovy, btw) Adobe Air flex. Any open source frameworks?

What are some of the other issues that I need to keep in mind? Some that I would like your comments on are:

  1. How does the fact that it needs to be deployed on the client complicates things? Since we are using Java, I believe this to be a non issue. I am aware of the usual trade offs between a web based app and a desktop app (e.g. ease of deployment and upgrades etc etc.)
  2. How easy is it to create a one click installer and bundle the app and the environment needed - eg. JRE etc?
  3. The product needs to work on Mac and Windows. Does that complicate things in any way (Again, since it is Java I am assuming there are no gotchas but would like to be forewarned if there are any)
  4. What is the framework or technology that may be good to have on the resume as a skill set?

My deadline is a max of 2 months - would that be enough for a reasonably simple web app given that I need to learn all of these technologies? I am just trying to get a sense here - I know it is most likely impossible to give an accurate answer - just assume I am smart enough and can pick up any unfamiliar tech stack fast enough.

Thank you!


Solution

  • GUI toolkit

    Given "Mac and Windows", I'd say that settles my recommendation as "Swing" (perhaps with SwingX1).

    1. I agree with your assessment of AWT. It does not support formatted text in any component out-of-the-box. It also lacks trees, tables (and other components) & people with recent experience using it. Note though, that it is also "bundled with regular Java SDK/JRE" just like Swing, it is just that it is older and less enabled than Swing generally.
    2. If anything complements Swing it would be SwingX. SwingX is built on Swing and provides advanced controls that are not available 'out of the box' in the J2SE.
    3. Swing and SWT are mutually incompatible - use one or the other.
    4. I have no experience with Griffon.

    Swing is the most used of the options outlined, so for getting help (ignoring other potentially important factors in the decision), it would be a good choice.

    Note 1) Add SwingX if they have any groovy components that present threaded conversations easily, but I suspect a JTextPane would suffice.


    Deployment

    As far as deployment goes, that is a little more tricky than it seems. Many desktop computers do not come with Java as standard. Those that already have it, might have an old version.

    1. To ensure a JRE of the right minimum version to run the app. is available, use the deployJava.js (mentioned, with links, in the JWS page below).
    2. To provide a 'one click' launch experience for the user, look to Java Web Start.

    Cross-platform gotcha's

    Unfortunately, though Java is x-plat, there are plenty of things that programmers can do that stuff that up. E.G.

    Note 2. That is showing the property to use for each.


    Timetable

    Obviously I cannot speak for you, but I can tell you that I would have had no chance of going from 'which technology' to a 'deployable app' within two months.

    Hope you're more capable than me! ;)