Rich client platforms versus JavaFX 2 versus Swing
Asked Answered
S

3

13

Pretty soon now, we're gonna need to develop a GUI for creating configurations (more like scripts, to be honest) for our EAI solution at work. Think of a typical workflow editor. The visualization of the actual flows will most likely be a completely custom job, either in Swing, SWT or JavaFX 2. What I have trouble with choosing is whether to do everything else by ourselves or using a rich client platform.

In particular, I've noticed that JavaFX 2 is getting a lot of attention and seems to be really pushed by Oracle as the next big thing in the Java GUI landscape. The demonstrations look interesting and perhaps this newer API is more closely focused on productivity as opposed to the tons of boilerplate code that Swing tends to impose. Using a newer technology that gets a lot of support seems like a safe bet for future maintenance.

Using an RCP would have definite benefits for this project. Whether we go for Eclipse or NetBeans as the platform, having existing plugins/modules for viewing the underlying (XML) config, version control etc. would offer powerful functionality with minimal work. I also like the idea of having project types of our software next to Java projects in the same GUI. Even simple stuff like window management and customly arranging panels is much better handled by RCPs that what we could whip up.

So the question now is, what technology or combination thereof is viable? My options, as far as I can see, are thus:

  • Eclipse. I'm not too eager for using SWT, though, since I'm more familiar with Swing. NetBeans is also my primary IDE and I'm most familiar with it. It always felt more intuitive too.
  • NetBeans. This'd allow development of custom components in Swing. A lower learning curve for me.
  • NetBeans + JavaFX 2. This idea appeals to me... Use NetBeans for the RCP goodness and using JavaFX 2 for custom components. JavaFX 2 apparently integrates with Swing, but how well can this be done within NetBeans?
  • Swing or JavaFX 2. Do all the GUI work ourselves or use some existing framework(s) to get most of what an RCP offers. This seems like a lot of work but also offers superb control. I'm a bit loathe to try this in Swing. How well would JavaFX 2 suit itself to this?

Basically my only GUI experience is in Swing on small apps. This is the first time I'll be going for something that would warrant a RCP. But JavaFX 2 seems the way forward and I don't want to miss the boat on that one. If Swing might be on the way out, I'd prefer hopping onboard the newer technology.

If there are people who can share their experiences, have tried something like NetBeans + JavaFX 2 or are closer to the forefront of JavaFX and can recommend/discourage its use for this sort of thing I'd be most interested.

I realize it's a somewhat open question, but I can't really think of a more appropriate place. I'm not looking for a "what's the best RCP / is JavaFX better than Swing" debate. I'm looking for valid points for/against their use in this context.

Sherrie answered 15/11, 2011 at 12:6 Comment(3)
Have you made a choice? It would be interesting to have your feedback, especially if you have opted for Java FX 2.Eliathas
@Eliathas The choice is going to be NetBeans as RCP, but whether I'll use purely Swing components for enriching it or integrate JavaFX 2 remains to be seen. Development hasn't started on this yet. Seeing how JRE 1.7 includes the JFX2 runtime starting from update 4, it has become increasingly convenient to opt for using it. There's support for Windows and Mac OS X, with Linux to come soon.Sherrie
I don't suppose you'd be willing to provide an update on how it went? :D. My team is investigating fx2 and netbeans platform and some other alternatives right now.Ratiocination
T
7

Here some points and (personal) opinions for helping you determining a proper solution for your current situation:

Eclipse vs. Netbeans

Personally, I dont't like big discussions about pros/cons of IDEs. Just use the one you feel most comfortable with. If you work in a team, make a voting. Considering Swing both IDEs are fine (IMHO Netbeans has the better GUI builder). Considering JavaFX 2.0 both IDEs are also fine but both share the absence of a GUI builder. I wouldn't recommend a mixture of IDEs.

JavaFX 2.0 vs. Swing vs. SWT vs. Eclipse RCP

Well, I don't - I even can't - want to tell you which of the above listed UI technologies is best since I don't know enough about your project's environment - experience, human resources, budget, timeline etc. Having a lean timeline and a team(?) of experienced Swing developers should lead the decision to Swing. Same for SWT and Eclipse RCP. Cutting edge developers might tend to try JavaFX. I agree, JavaFX gets a lot attention and you get great looking demonstrations, but keep in mind, that using JavaFX requires - additionally to the JRE - the JavaFX runtime on each client.

Hope this helps.

Tellus answered 15/11, 2011 at 22:49 Comment(2)
Certainly valid points. I'm not certain what the merits are of Eclipse versus NetBeans as platforms (ignore IDEs for a moment), just that NetBeans "feels" more natural to me. As for GUI builders, I'm not a big fan of those anyway and tend to go for the hand-crafted approach. NetBeans will be the first with good support for JavaFX development (and possibly using it under the hood), but the runtime requirements does give food for thought. Perhaps I'd do best to see how quicly they get OS X and Linux support up and running. Thanks!Sherrie
FYI - SWT requires a native library on each client too (because of its tight integration with the underlying OS)Footrace
I
11

My opinion in few lines,

JavaFX2 can be integrated into Swing and SWT applications into a panel/container.

Swing doesn't provide a structured architecture to deal with multi components applications, Eclipse RCP does but it's heavier and sometimes too complex (WindowWorkbench etc..) and hard to customize.

If you have a good UI Designer in your team (Developer or Graphic Designer) you should begin to work on an application Full JavaFX2 with a simple but powerful framework (like JRebirth or a custom one you can build on your own way).

JavaFX will be the Java UI Standard for years to come, It could'nt be a bad choice, thus its architecure is pretty good and powerful Moreover javaFX2 could be used into a browser and/or deployed online with help of JNLP. Don't bother you to learn complex undocumented framework (like EclipseRCP), create Yours !! and be free to make the application your client need :D

I worked 3 years on Swing Appz, 2 years on Eclipse RCP, and 2 years on Flex/Silverlight/JavafX apps

Inpour answered 12/1, 2012 at 16:34 Comment(0)
T
7

Here some points and (personal) opinions for helping you determining a proper solution for your current situation:

Eclipse vs. Netbeans

Personally, I dont't like big discussions about pros/cons of IDEs. Just use the one you feel most comfortable with. If you work in a team, make a voting. Considering Swing both IDEs are fine (IMHO Netbeans has the better GUI builder). Considering JavaFX 2.0 both IDEs are also fine but both share the absence of a GUI builder. I wouldn't recommend a mixture of IDEs.

JavaFX 2.0 vs. Swing vs. SWT vs. Eclipse RCP

Well, I don't - I even can't - want to tell you which of the above listed UI technologies is best since I don't know enough about your project's environment - experience, human resources, budget, timeline etc. Having a lean timeline and a team(?) of experienced Swing developers should lead the decision to Swing. Same for SWT and Eclipse RCP. Cutting edge developers might tend to try JavaFX. I agree, JavaFX gets a lot attention and you get great looking demonstrations, but keep in mind, that using JavaFX requires - additionally to the JRE - the JavaFX runtime on each client.

Hope this helps.

Tellus answered 15/11, 2011 at 22:49 Comment(2)
Certainly valid points. I'm not certain what the merits are of Eclipse versus NetBeans as platforms (ignore IDEs for a moment), just that NetBeans "feels" more natural to me. As for GUI builders, I'm not a big fan of those anyway and tend to go for the hand-crafted approach. NetBeans will be the first with good support for JavaFX development (and possibly using it under the hood), but the runtime requirements does give food for thought. Perhaps I'd do best to see how quicly they get OS X and Linux support up and running. Thanks!Sherrie
FYI - SWT requires a native library on each client too (because of its tight integration with the underlying OS)Footrace
G
0

We switched to javaFx due to FXML usage,you can use MVC pattern ,you can add javascript and css init,but it seems slow when changing page

Greiner answered 5/6, 2014 at 16:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.