JavaFX usage - discuss?

  • (2 Pages)
  • +
  • 1
  • 2

17 Replies - 15241 Views - Last Post: 23 January 2013 - 10:58 AM

#1 DaneAU  Icon User is offline

  • Great::Southern::Land
  • member icon

Reputation: 284
  • View blog
  • Posts: 1,615
  • Joined: 15-May 08

JavaFX usage - discuss?

Post icon  Posted 23 December 2012 - 05:23 AM

Ok so i rarely ever start a topic; however i thought a shout out to my friends in the world of Java was warranted and thus i hope to see if anyone uses JavaFX and perhaps could enlighten me with their experiences with this technology. So do you, have you, would you, why not or why never?

The reason i ask is because i was toying around working on an application to display some dashboard style information on some media TV's at work and wanted a nice easy to use graphics system to display some data. After a bit of dabbling around with applets i became frustrated by it; they just always turn out crap and tacky, so 1990's. I then took some of the back end code and mixed it with a squirt of JavaFX and in half an hour had a polished and elegant looking interface that i must remark made my smile, it really was good and suited my needs perfectly, especially in a prototyping situation, the finish was production like (with exception to the missing functionality).

When this JavaFX caper came out, i can recall very little talk or discussion here at DreamInCode. Few questions seemed to present themselves and i figured it was a miss from Oracle and undertook no further investigation. The thing is, i can't fully understand why this dismal failure in uptake is so? I did some good old Googling to find real world examples of enterprise applications or at least significant applications utilising this technology and found that they are few and far between. There is a large amount of brow beating and some of it is justifiably so floating around. The main beatings center around the deployment failures and make reflections back to the failure of Java applets, which in my opinion are wretched and hideous things not worth the wear and tear on my keyboard. I digress.

So before i waffle on for days and do my brain dump here, may i ask your opinion and perspective? I know i am well behind the take up point, however i kinda liked working with JavaFX, it was a pinch of salt to learn and i reckon after a week of development i could blow my bosses away with a very professional application built upon this undiscovered new found wonder of my life. Of course should you have a differing view or wish to avert my attention elsewhere for a demonstrated reason, well i am all ears!

Is This A Good Question/Topic? 2
  • +

Replies To: JavaFX usage - discuss?

#2 GregBrannon  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2194
  • View blog
  • Posts: 5,222
  • Joined: 10-September 10

Re: JavaFX usage - discuss?

Posted 23 December 2012 - 05:52 AM

A similar topic was started here in April, and it didn't go far.

I have also been curious about the lack of discussion on this topic, largely a ho-hum response from the crowd. I'll make the arguable observation that the Java Forum is largely driven by what's being taught at the university level, and apparently JavaFX is not.

There are professional coders here, and they have also been silent on the topic, either comfortable with Swing or required by their employers to use it.

JavaFX has had a slow, stumbling start, was not deployed widely until Java 7, and then Java 7 had the big security scares. There just hasn't been the rush to adopt JavaFX, and it would seem there hasn't been a large crowd either demanding it or anxiously waiting for the next great thing, or JavaFX came and was judged to not be it, but I think it's too soon to say that's the case.

I wasn't around for the Swing rollout, so I can't compare the reception then to the reception now, but I'd be curious to hear from someone who witnessed both.
Was This Post Helpful? 1
  • +
  • -

#3 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 797
  • View blog
  • Posts: 2,424
  • Joined: 29-July 11

Re: JavaFX usage - discuss?

Posted 23 December 2012 - 09:52 AM

I'm torn over Javafx. Swing is currently in maintenance mode. No new features will be added. It will now only ever see bug fixes. Oracle wants Javafx to be the future. I think Oracle should have concentrated on updating swing instead of rolling out JavaFX. The RIA wars are over. Javascript and HTML5 has won.

Swing is currently the dominant UI toolkit, and that won't change for a long time. Having only played with JavaFX for a few minutes, I can say that the only thing I really like about it is the xml markup for ui and how quickly you can write polished interfaces. Other than that, I don't like the whole Stage methodology. It's too foreign to me.

In the end, however, I just do not have a good feeling about JavaFX. I like Java the way it is. It works well. If Swing ever falls out of favor, I will use SWT. I doubt I'll ever use JavaFX, and I suspect that most Java developers feel the same way.

On a side note, I too hate applets, but I like swing in applets. :)
Was This Post Helpful? 1
  • +
  • -

#4 darek9576  Icon User is online

  • D.I.C Lover

Reputation: 198
  • View blog
  • Posts: 1,672
  • Joined: 13-March 10

Re: JavaFX usage - discuss?

Posted 23 December 2012 - 10:25 AM

JavaFX is the future. The amount of information on the internet about it is growing every day, although it could be better. I never did any advanced GUI since i am not good at designing but the things people post on the internet looks incredible. If you were to do it in Swing, you would manage but it would be very hard.

Do this in Swing, and i will be impressed.
http://www.youtube.c...h?v=nxw4H0204KA
Was This Post Helpful? 1
  • +
  • -

#5 DaneAU  Icon User is offline

  • Great::Southern::Land
  • member icon

Reputation: 284
  • View blog
  • Posts: 1,615
  • Joined: 15-May 08

Re: JavaFX usage - discuss?

Posted 23 December 2012 - 02:45 PM

Hey thanks for the reference. Whilst i do agree that JavaFX is something not taught at university or entry course levels i still leaves me perplexed considering good students and those enthused by programming lead themselves to investigation, exploration and experimentation with languages based on their own desires and as such surely there would be more of the programming loving hippies like us twiddling with this technology, especially considering the strong backgrounds and long time love affairs with all that is java.

The thing that troubles myself is the total lack of work on JavaFX undertaken and not even considered. Whilst i do agree the whole stage idea is a different paradigm for people to grasp, i certainly find it un-agreeable that the whole stage structure is something not worth learning, considering most sophisticated graphics requires some derivative of Stages, Scenes and Viewports. The uptake has been a trickle and to be honest it is refreshing to see a situation that is absent of the flock of blindly unaltered fanbois; but rather a small segment of people with a desire to build on top of the JVM.

My belief is that Java GUI is simply lacking and needs a real kick in the ass to get it up to date with the times. Developing a really good, sleek and respectable application is not as simpler task as it should be. Sure drag and drop development is capable of procuring an organised UI, but transitions, animations, media are severely lacking in java and if no energies are committed it will see the diminished use of the technology in the tablet, mobile and handheld device, this does not include desktop computing.

I agree darek9576 there is a bright future and dire need for something to sit on top of the java platform. I am devoting some time to developing with it and will see how things progress.
Was This Post Helpful? 1
  • +
  • -

#6 darek9576  Icon User is online

  • D.I.C Lover

Reputation: 198
  • View blog
  • Posts: 1,672
  • Joined: 13-March 10

Re: JavaFX usage - discuss?

Posted 23 December 2012 - 02:58 PM

People on this website complain that other memebers dont separate their classes into MVC or other patterns when it comes to Swing. But it's not always that easy to do. Writing your own PropertyChangeListener or other Observer pattern is boring.

JavaFX allows you for a clean-er design using FXML and it has other goodies like ObservableList that will fire an event when it is changed in any shape of form and you just need to listen for it and decide what happend - element added?, element deleted?, element updated? etc.
It also has JavaFX Properties that let you do binding but i dont understand it yet.
Was This Post Helpful? 2
  • +
  • -

#7 Ghlavac  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 515
  • Joined: 14-January 09

Re: JavaFX usage - discuss?

Posted 23 December 2012 - 06:52 PM

I love it.

I just haven't had much reason to utilize it much, my larger projects are mostly serverside stuff.

In addition my focus has shifted to languages that have already had what fx2 have had for a long time, and thensome. (.NET/C#) but it really is quite a good toolkit if you can live with forcing people to use 7u6+

This post has been edited by Ghlavac: 23 December 2012 - 07:12 PM

Was This Post Helpful? 0
  • +
  • -

#8 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 797
  • View blog
  • Posts: 2,424
  • Joined: 29-July 11

Re: JavaFX usage - discuss?

Posted 11 January 2013 - 11:21 AM

I have done a complete 180 on JavaFX. After spending yesterday playing with it, I LOVE IT. FXML is awesome. Java is exciting again.
Was This Post Helpful? 0
  • +
  • -

#9 Ghlavac  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 515
  • Joined: 14-January 09

Re: JavaFX usage - discuss?

Posted 11 January 2013 - 02:47 PM

Haha it really is nice ;)

Just think what happens when java catches up elsewhere.

This post has been edited by Ghlavac: 11 January 2013 - 05:39 PM

Was This Post Helpful? 1
  • +
  • -

#10 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 797
  • View blog
  • Posts: 2,424
  • Joined: 29-July 11

Re: JavaFX usage - discuss?

Posted 11 January 2013 - 06:32 PM

catches up? i hopes you don't mean with the "automagical syntactic sugar" of c#. were getting lambda functions soon. i don't really want much more than that. c# has become took bloated and complicated with that stuff. var, ref, out, optional and named parameters,delegates. No, delegates are nice. :

This post has been edited by farrell2k: 11 January 2013 - 07:13 PM

Was This Post Helpful? 0
  • +
  • -

#11 Ghlavac  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 515
  • Joined: 14-January 09

Re: JavaFX usage - discuss?

Posted 11 January 2013 - 08:36 PM

Optional params are nice too. :P

But yeah by catch up I do mean lambdas and things of that like, I am sick of not having such things it's one of the things that still makes me wary of java, it is just so damn slow to catch up to a language that came AFTER it.

But FX2 is flipping great.

My only gripe about it is it lacks a formatted text field.
Was This Post Helpful? 0
  • +
  • -

#12 DaneAU  Icon User is offline

  • Great::Southern::Land
  • member icon

Reputation: 284
  • View blog
  • Posts: 1,615
  • Joined: 15-May 08

Re: JavaFX usage - discuss?

Posted 22 January 2013 - 05:19 AM

Hrmm, true Ghlavac however the languages that came after it don't possess a lot of the key features Java and the JVM do. Formatted text field would be an advantage, i guess on could create their own subclass? Whilst lambda would be alright, i have not found a real reason to use it.
Was This Post Helpful? 0
  • +
  • -

#13 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1292
  • View blog
  • Posts: 2,863
  • Joined: 30-January 11

Re: JavaFX usage - discuss?

Posted 22 January 2013 - 05:25 AM

View Postfarrell2k, on 12 January 2013 - 02:32 AM, said:

c# has become took bloated and complicated with that stuff. var, ref, out, optional and named parameters,delegates. No, delegates are nice. :


Lol I fail to see how var, ref, out optional and named parameters would be confusing to you. Once you var you can never go back!

As for me I really miss lambdas in Java. I use them all the time in C# and love using them. Do in one line what you can do in 50 lines of Java sometimes.

Looking forward to Java 8 for that reason and that reason alone. If you can use it in a way that gets similar to LINQ then I'm going to like it.

All we need now is the addition of async/await in Java :P/>

This post has been edited by Ryano121: 22 January 2013 - 05:27 AM

Was This Post Helpful? 0
  • +
  • -

#14 farrell2k  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 797
  • View blog
  • Posts: 2,424
  • Joined: 29-July 11

Re: JavaFX usage - discuss?

Posted 22 January 2013 - 03:35 PM

View PostDaneAU, on 22 January 2013 - 12:19 PM, said:

Whilst lambda would be alright, i have not found a real reason to use it.


That's because you can get along fine without ever using it in c#, as well. It's just syntactic sugar.


View PostRyano121, on 22 January 2013 - 12:25 PM, said:

Lol I fail to see how var, ref, out optional and named parameters would be confusing to you. Once you var you can never go back!


Eh. You have no idea how many times I have seen this monstrosity in code, and this is the simplest case.

var connection = Connect();



or even:

var final = 12.0;



And the idiot who wrote it was fiddling with decimal, but neglected to append an "m" at the end of the 12, just as so many Java developers forget to append an L to the end of their longs. The compiler doesn;t complain, so they don't even think of doing it. Now I have to spend time figuring it out.

var is the worst piece of "automagical syntactic sugar" available in c#. The other make the language confusing to learn. Microsoft is trying to be all things to everyone, and the language is becoming more and more muddied. It's simplicity is suffering.

This post has been edited by farrell2k: 22 January 2013 - 03:37 PM

Was This Post Helpful? 0
  • +
  • -

#15 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1292
  • View blog
  • Posts: 2,863
  • Joined: 30-January 11

Re: JavaFX usage - discuss?

Posted 22 January 2013 - 03:54 PM

I fail to see your point here. I think what you are really complaining about is moron developers who can't document their code.

var Connection = Connection();


Boils down to stupid method and variable names, not a problem with var at all. If you really get stuck then it takes 2 seconds to hover over the method and see what it returns. Not a problem. When var really saves you is with long types e.g-

Dictionary<MyClass<string>,List<int>> items = new Dictionary<MyClass<string>,List<int>>();


Sorry about the contrived example, but that line of code is horrible. You don't need to say what your are defining twice.

var items = new Dictionary<MyClass<string>,List<int>>();


So much better, I can still see what type it is and I save repeating myself.

Same goes with
var num = 12.0;


If they forget to put an l or m at the end, then the developer is an idiot. I can still clearly see what the type of num is from this expression. Of course as with most things it all boils down to personal opinion, but var can often make code easier to read, not harder.

The others make the language hard to learn? I don't think so. There is nothing confusing about optional parameters, if you don't like them then just don't use them.

View Postfarrell2k, on 22 January 2013 - 11:35 PM, said:

View PostDaneAU, on 22 January 2013 - 12:19 PM, said:

Whilst lambda would be alright, i have not found a real reason to use it.

That's because you can get along fine without ever using it in c#, as well. It's just syntactic sugar.


But it's very tasty synactic sugar. Defining a whole bunch of delegates on their own when doing a load of LINQ queries would be a massive pain and would introduce a whole bunch of boilerplate code. Lambda expressions are in to a lot of C# developers one of the best language features in C#.

After all they aren't putting them in Java for the hell of it. People actually like them and want to use them.

This post has been edited by Ryano121: 22 January 2013 - 03:50 PM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2