How can I solve using the Swing GUI or the lightweight web client for the user interface of my Java application?

It seems like I always have an internal struggle when it comes to the user interface. I am building an engine application and tend to put off the user interface after I get my algorithms. Then I go back and forth, trying to decide how to allow the user to interact with my program. Personally, I am a fan of the command line, but I can not expect my users as a whole.

I really like what is possible in the browser in the era of web 2.0 and ajax. On the other hand, it’s not so difficult to make the Swing interface, and you can generally count on a more consistent presentation for the user (although using a good javascript structure like YUI or jQuery is very important for normalizing browsers).

Obviously, both approaches have their advantages and disadvantages. So, what criteria / settings / situations should motivate me to use a lightweight (e.g. web-based) graphical interface? What criteria / parameters / situations should encourage me to use a heavier (e.g. Swing-based) graphical interface?

I do not intend to start a fiery war, just interested in the constructive / objective opinions of the community.

Edit # 1 In the light of the first few answers, I would like to clarify that I would like to deploy my application regardless of whether it should be hosted on some kind of Internet server. So I would have to deploy a small a la Jetty / Tomcat web server infrastructure or the like.

+6
java user-interface ajax swing
source share
8 answers

It depends on the application, and this is essentially a usability issue (although there are considerations such as data storage and platform requirements). Think about the pros and cons.

Benefits of a lightweight web interface:

  • Ease of distribution
  • Platform independence
  • Ease of maintenance

Disadvantages of a lightweight web interface:

  • Less environmental control
  • Markup standards vary between browsers
  • Requires a web server and everything connected with it.

Benefits of an Executable User Interface

  • More environmental control (e.g. full-screen applications, etc.)
  • Not necessarily subject to delays and failures.

Executable Interface Ends

  • Push Updates May Be More Complex
  • Installation required
  • Potential platform requirements (frameworks, packages, etc.)
  • Potentially, knowledge of advanced network topics (web services, etc.) is required.
+2
source share

One of the small factors that you might want to consider is that the user will go through some type of installation (albeit minimal) if you are distributing the swing application.

Also, the web application will allow you to accurately track the use of your application (through Google Analytics or something like that). Not sure if this is a concern, but it may be useful to you in the future.

+1
source share

If this is a client-server application, I would normally use the web interface for the application.

You will get rid of countless problems with things like installed versions of JRE, distributing updates, application permissions, hidden shortcuts ...

+1
source share

You need to violate the requirements of the application in order to solve this ...

  • Do users have Java sufficient version? It must be to run the Swing GUI.
  • Do you have a web server?
  • Need Swing GUI Flexibility or Web Accessibility?
  • Is Java Webstart and an option, if so, you can distribute the Swing GUI over the Internet.
  • Does your application do extensive computation or processing? If so, the client application may be the answer.

There are a million questions like these. I would suggest a brainstorming session and track all the pros and cons of each of them, adding a point score, and not throw it all away and go with your gut feeling :)

+1
source share

If you expect frequent updates in the application, then the web interface might be better since the user will not need to update the client or install a new client that contains updates. If you think that the user may need the opportunity to use the application, rather than conencted on the Internet, then the swing will be better.

Only two things from the head.

0
source share

Think about users and use cases of your project.

Do users expect access to it when they are disconnected from the Internet (for example, on an airplane or in a cafe where there is no Internet access)? Use Swing.

Do you want users to have access to the same tool from different computers (for example, both at work and at home)? Use the web interface.

Also consider whether the user needs to save and load data and whether the tool can create data files that some might consider sensitive (if so, online storage can be a problem).

0
source share

Quickly guess, I often try to ask myself / clients if the application has a high demand for recording. For most read-only applications, the thin client solution is great. But if you need a lot of writing, the swing desktop application has more flexibility.

Personally, I always prefer the desktop app for swing. It can be easily deployed using Java Webstart.

0
source share

I don’t know anything about your application, I can’t give a better recommendation. However, I can state from personal / professional experience that installing the application on client machines is a BIG pain in the ass than it seems.

With AJAX / web, you really only need to worry about support, like three browsers. Installation containers / updates are perceived only once when the product is deployed to a web server.

With a Swing app that looks like a stand, you are faced with a really big mess that installs the app on unknown systems. This mess was so bad that things like AJAX were really advanced to make web apps behave / feel like a real native app.

0
source share

All Articles