Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help Picking The Right UI Framework / Platform  RSS feed

 
Alvin Parker
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope I'm in the right forum.

I need to refactor an application that currently runs on the desktop (Win/Mac) and iOS. For the iOS part, I'm leaning towards just building it native in Objective C or Swift. For the desktop, I want to use Java so that I can have a single codebase for those systems. But, I have not used Java's UI since javax.swing.

Is Java the right tool for building the UI? Since this is a desktop app, I don't want to use JS as the front end. The current app is built in ActionScript. I'm moving out of AS due to the fact that this app has a large video component. To make it work with AS, I had to convert all MP4's to individual PNG's and blit them. Using the AS video functions, the user could not scrub video to frames they expected to scrub to. Now that it blits, it is precise and works great other than the fact that my videos are huge and it takes a long time to get them from/post them to the server. Still, I have a (mostly) working solution, but the goal of going with AS was to have one platform for iOS and desktop. Then came another problem. Features that work well on the desktop don't work very well in mobile so I have had to essentially split the codebase and make two versions of the app anyway. And, given that I'm blitting, iOS devices run out of memory very quickly (imagine just 10 seconds of video at 30 FPS and how many PNG's that is). Given that I have to have two code bases and the limitations I'm faced with, I may as well do all this native (or as native as possible where Java is concerned) and gain the optimizations of each platform's native features.

With AS, the UI is great and fairly easy to implement and maintain. I make the art, display it on the screen and can skin very easily. But, I've got no clue how to do all this with Java and what Java framework would be best for me to use to try to keep the same architectural strategy in place. Can someone give me some advice and/or point me to resources to help me make a defensible decision to use Java as the UI for the desktop version of my application? Is there a great example of an app that uses Java as the UI but that also does not look like it is using Java as the UI that I may be able to learn from?
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could do it with JavaFX, Java's new GUI framework.

I have not used it extensively but it also has support for working with video.
 
Vasilis Souvatzis
Ranch Hand
Posts: 94
1
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd also recommend JavaFX. The UI's Look'n'Feel is much better than the one from Swing (which I find horrible) and the framework is quite rich in features. To me it seems it's quite lightweight as well (as far as my noob apps can go) and you could also run the same app on both desktop and iOS.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!