• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Recommendation for framework for desktop application

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I'm new around here and hope I've found the correct board for this topic. I'm an experienced developer though I haven't worked that much with Java and especially my knowledge of Java technologies (frameworks, libraries, etc.) is lacking. I have an old hobby project that I want to rework completely and update to use new and efficient Java technologies and hopefully learn a lot in the proces. I hope you guys can help me choose the best way to go at it, and pick the most fitting framework and libraries for it.


Now, the application has some unusual non-functional requirements:
- It's a management application and it's used a couple of times a year over the course of a weekend to keep track of a real time game campaign
- It must run locally because internet access isn't always available
- It must run as a desktop application with minimum setup, so that it's easy to move to a different PC in case the primary PC breaks down (since it's real time)
- For the same reason, persistence of data must be easily available to move (and backup) (currently it uses XML files)


The application consists of three sets of UI:
- The primary input UI used by the campaign manager to update status about the campaign
- A map of the campaign area, usually put on a secondary screen like a projector on a wall so every campaign participant can see it
- The same map displayed on a website for everyone else to see

The way the last part works is not actually part of the application, but the campaign backend updates at regular intervals and if it has internet access it posts campaign data to a website, that then displays the newest data. The website has a tiny PHP backend that can receive the data from the desktop application and a JavaScript frontend. The rest of the UI uses Java Swing. Now, obviously there could be some synergy made in making both maps work in JS but only if it otherwise makes sense.


So, my problem right now is that I'm not sure how I should start this over proper. A framework often goes a long way helping to structure and run an application but I don't know if any frameworks are better than others for this kind of task. I have a bit of experience working maintenance on Spring framework applications, though I've never started my own yet. My initial idea would be to use Spring Boot and possibly using Angular for frontend with an embedded Tomcat, though I've got no real experience with Angular yet.

It would probably work but are there better ways? If I go with Spring Boot, do you have recommendations for other frameworks / addons that I should use along to better support the features I need?

Thank you for reading this far. All input and suggestions are welcomed
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat and Angular are odd choices for a desktop application.

Swing still appears to be the preferred framework for desktops apps. Perhaps we need more information on why you feel it needs to be rewritten? It sounds like you want to use web application technology for a desktop application, so something's not jiving.
 
C Bulow
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your feedback.

Well, yes I agree, both are web technologies. The thought was to be able to reuse the frontend for the map used two different places but as mentioned, I'm not even sure if this is preferable. The last part of the frontend with the user interaction could be made in same way to limit the amount of technologies.

Otherwise from what I can google, it appears that JavaFX is the default choice for Java frontend.


There are three reasons I want to rework the application, but first I should mention that I don't intend to rewrite everything

- Outdated technology: The current frontend is built using the integrated Netbeans GUI builder, that was deprecated in Netbeans 7.1. This means I have to keep an old Netbeans version around for this application. Not a problem per se but a time might come when it won't work anymore. I chose it back in the days for a quick way to get a GUI and it has worked fine.

- Restructoring: The basic design is using a MVC approach but this was never kept as strict as I should have, so sometimes adding new features or doing maintenence is more troublesome than it should be. Reworking it would clean up the mess and I've learned better ways to structure it in the meantime. I'm just curious whether a framework might aid this further by adding best practices.

- Learning new: As mentioned earlier I feel my knowledge of Java technologies are a bit lacking and I wanted to use the oppertunity to learn something new. This application is something I'll keep using and evolving for a long time, so I felt the obvious choice was to use it as a basis for improving.
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...and welcome to the Ranch
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:
Swing still appears to be the preferred framework for desktops apps.



Swing hasn't been supported for quite some time now.
JavaFX is the main desktop UI these days.
 
Campbell Ritchie
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
no, they appear to have stopped maintaining Swing.

I think this thread should be duplicated in the GUIs fora.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dave Tolls wrote:Swing hasn't been supported for quite some time now.



I guess that depends on your definition of "supported". If you mean adding new features then you're right, but if you mean bug fixes that's not correct.


Dave Tolls wrote:JavaFX is the main desktop UI these days.



Again, what's your definition of "main desktop UI"? JavaFX certainly was marketed heavily in years past by Oracle -- though even that seems to have faded -- but it never gained traction in the marketplace and is far less commonly used than Swing.
 
Brett Spell
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:no, they appear to have stopped maintaining Swing.



Why do you say that? I just checked the Swing mailing list, and it has current / recent activity from Oracle employees regarding bug fixes.
 
Brett Spell
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This was written in the JavaFX mailing list about six months ago by Donald Smith, Senior Director of Product Managment at Oracle Corporation:

I understand that while there is both Swing and JavaFX available that people will continue to question the existence of each — so be it. Each has it’s own niches and benefits and our strategy, as it has been for years now, is to continue with each (emphasis mine).

 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dave Tolls wrote:

Bear Bibeault wrote:
Swing still appears to be the preferred framework for desktops apps.



Swing hasn't been supported for quite some time now.
JavaFX is the main desktop UI these days.



I didn't say supported by Oracle, I said "preferred". I don't work with Java desktop GUIs, but from what I hear, JavaFX is Oracle's direction, but Swing is what most people still use.

But, not my area of expertise so ... salt ...
 
C Bulow
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hehe, this seems to be a matter of debate. But true, one aspect of this is to choose a GUI framework, another a backend framework, where with the use of the latter I hope to streamline my backend more.


Oh, and @Campbell Ritchie, thank you



Campbell Ritchie wrote:I think this thread should be duplicated in the GUIs fora.



How do you usually go around this in here? Post a link or separate the discussion?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ask a staffer to do it. Posting a duplicate discussion will get removed.

By the way: already been done. See top of post.
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like somebody has already copied the thread into several GUI forums. So that's taken care of.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Another direction you might consider, which lines up with some of what you've already said: an AngluarJS SPA on top of a RESTful API. That way, it can be run anywhere in a browser without regard to platform.
 
Campbell Ritchie
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brett Spell wrote:Why do you say that? . . .

I was obviously mistaken. Things like having an up to date constructor for JComboBox taking List don't seem to have been implemented. As previously stated, Oracle have been pushing FX.
 
C Bulow
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, the idea about using Angular was so I could use the same code twice, minimising maintenance. Didn't think about using a RESTful API, though. I can see that makes sense. But that would bring the Tomcat into the desktop application and I'm not sure if that's a proper way to do it, so that's why I looking for advice.

How about backend frameworks, do you have any recommendations about that?


Bear Bibeault wrote:By the way: already been done. See top of post.



Ah, I see. Didn't know how it worked here. Thank you kind moderator, whoever you are.
 
C Bulow
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems like there are no other recommendations for backend framework, so I'll just stick with my initial thought and go with Spring Boot in that regard.

For frontend it seems divided between using Swing or JavaFX, or perhaps go with a web based like Angular.

For Swing and JavaFX, are there any decent GUI builder tools available to speed up development and ease maintenance? From what I can read, Oracle had one for JavaFX but discontinued it. And from what I can remember, building Java Swing GUI by hand was quite tedious but I don't know if that's changed. What do you prefer when making GUI?
 
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

C Bulow wrote:For Swing and JavaFX, are there any decent GUI builder tools available to speed up development and ease maintenance?

There are:

For JavaFX
Needed e(fx)clipse plugin (If you're using Eclipse, Netbeans has an integrated plugin, as well as IntelliJ)
JavaFX Scene Builder (GUI builder)

For Swing
Window Builder (GUI builder)

Probably there are more on the market. Those are one of options.
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The FX builders are (IMO) better than the Swing ones, chiefly because FX was at least built with them in mind.
 
Brett Spell
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

C Bulow wrote:For frontend it seems divided between using Swing or JavaFX, or perhaps go with a web based like Angular.



Angular or a similar alternative (e.g., React) would probably be the best choice long term.

C Bulow wrote:For Swing and JavaFX, are there any decent GUI builder tools available to speed up development and ease maintenance?



The already-mentioned Window Builder is a popular option for Swing, and a lot of people seem to like Jigloo.

C Bulow wrote:And from what I can remember, building Java Swing GUI by hand was quite tedious but I don't know if that's changed.



No, it hasn't. But in my opinion that tends to be the nature of UI work in general. At least that's been my experience with both desktop and web UI frameworks.

C Bulow wrote:What do you prefer when making GUI?



Personally I don't use GUI builders because they tend to produce code that's hard to maintain "manually" (without the builder), which means that they'll save you time in the short term but cost you time in the long term. Your mileage may vary.
 
C Bulow
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you all for your suggestions, it's much appreciated. I'll have a look at them.
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic