6

I want to make Dynamic UI for a desktop application. I am planning to make it in JavaFX. Is it a good choice?

Second thing I want to know is that is it possible to have UI by JavaFx and behind the scene major work in done by pure java? I am totally new in JavaFX so correct me if I am wrong.

Also If I am wrong tell me other possibilities for the Dynamic UI and java code behind for a standalone application.

Bo Persson
  • 90,663
  • 31
  • 146
  • 203
Dhruv
  • 10,291
  • 18
  • 77
  • 126
  • *"Dynamic UI"* What does 'dynamic' (or 'Dynamic' for that matter) mean in your head? To me it means a number of quite different & unrelated things. – Andrew Thompson Mar 23 '12 at 12:07
  • 1
    Mean I am just bored of UI that i used to see in swing application... I you have see UI of kaspersky 2012 antivirus... for me that is dynamic.. UI with lots of effects animated sliding panels .. cross effects and all – Dhruv Mar 23 '12 at 12:09
  • 3
    I pity your end-users. End users generally prefer the path of least surprise over what some developer thinks is the 'kewl new thing'. But then, some might call me old fashioned. ;) – Andrew Thompson Mar 23 '12 at 12:13
  • I'd say Mac and iPhone popularity disapprove above statement :) – Sergey Grinev Mar 23 '12 at 13:44

3 Answers3

4

Having JavaFX 2 UI and pure Java background is valid and usual approach.

There is a good example in this question: JavaFX in enterprise web applications - good alternative to classic web pages?

Community
  • 1
  • 1
Sergey Grinev
  • 34,078
  • 10
  • 128
  • 141
2

There's also Swing, SWT, and the Eclipse and NetBeans RCP platforms.

Whether or not JavaFX is a "good" choice, that's more opinion than fact. I wonder about its future. Personally, I like a lot of what's available in Swing combined with a nicer language than Java, like Groovy, JRuby, etc. In an enterprise environment, purchasing a LaF seems a reasonable option.

Yes, JavaFX allows re-use of existing Java libraries; integrating existing code was a design goal.

Dave Newton
  • 158,873
  • 26
  • 254
  • 302
  • 1
    *"I wonder about its future."* +1 as do I. I hear occasional reports about it, but it hardly seems to be going 'main-stream' anytime soon. I suspect it is one of those projects that will lurch along a bit longer, before being abandoned. – Andrew Thompson Mar 23 '12 at 12:15
2

If creating a desktop application with JavaFX is a good choise or not,... I can't tell you. Even the future of JavaFX is unclear. Despite this, it really depends on your aims and requirements (e.g. target audience, maintenance, ...). Maybe, your question has to be more specific. But, if you are your only customer then 'happy coding' with JavaFX :)

Some hints that might help you getting started:

Separation of concerns
To separate UI from all the other stuff is always of high value. A major key is the Separation of concerns. Starting with this article is a good starting point.

Design Patterns
The next step is to decide for a design pattern enabling to separate presentation from the processing of data. Personally, I'm a fan of the Presentation Model. There are many other patterns out there and I'm sure you'll find the one, fitting your requirements. So it is possible - and always a good approach - to use e.g. JavaFX for UI and pure Java for all the other stuff.

Hope this helps.

pmoule
  • 4,322
  • 2
  • 34
  • 39