Apologies for an earlier version of this post, I pushed the send button before I had completely formulated it and the earlier version was not worded as I would ultimately wish.
----
There is some truth and many inconsistencies and misunderstandings in your post.
I advise not trying to start a constructive conversation with such negative wording and such a negative point of view.
Many of your concerns have already been discussed in other posts in this forum (see posts by Hendrik Ebbers - just search the forum for "Hendrik").
In general, I prefer to have just a single question and write a single answer to it rather than addressing things point-by-point => I find such a format more useful to future readers who might just be interested in one particular point rather than a large intertwined conversation mixing many points.
> I have been studying Java for about two months.
That is a relatively short time. You have picked up a good, but incomplete, understanding of some issues within that time.
> My thinking behind my choice was that Java allows me to target many platforms
It does.
> and also ultimately android.
It does, kind of. Outside of using the Java programming language syntax and semantics, Android is not really Java, certainly it is not Oracle Java. The android API and execution environment provided by Google differs from the the traditional Java Runtime provided by Oracle. If your ultimate target platform is Android, then I advise you to
learn Android development based on Google resources.
You can write Java programs against a combination of the JavaFX API and the Google Android API and run them on an Android Phone when you ship your own Java virtual machine with your application. Instructions on how to do this are provided at the
javafxports website. I advise such a route only under the following circumstances:
1. You have quite a bit of development experience.
2. You are OK with tackling teething problems and issues for which you may not receive a lot of assistance.
3. You aware that such work is under what I would term an "experimental" category and don't necessarily expect your resultant application to be a widely deployed production application within the next twelve months.
4. You motivation to do the work is either because you would find it enjoyable to work in such a way or because you want to use largely the same code base for multiple mobile devices (Android/iOS/rasberry PI).
5. You understand that to make full use of features provided by a given platform you may have to write some platform specific code.
> When it comes to JavaFX, I cant really find any resources.
The JavaFX client documentation is (IMO) high quality and up-to-date.
http://docs.oracle.com/javase/8/javase-clienttechnologies.htm
> The oracle site is a mess linking to content that hasnt been updated in ages
You can contact Oracle requesting them to fix broken links, either via emailing:
javasedocs_us@oracle.com <
javasedocs_us@oracle.com>
Or filing an issue in an issue tracker:
https://javafx-jira.kenai.com
> In general googling around I am getting the imrpression that no one is really interested in JavaFX or using it.
There are some people interested in using JavaFX (check questions under the JavaFX tag on StackOverflow for instance). It is more of a niche technology than server side Java development or iOS/Android development - the JavaFX development community is not as large as those development communities (by orders of magnitude).
You can get an idea of some of the things some people are doing with JavaFX by reading posts on the fxexperience blog:
http://fxexperience.com
> I havent found any discussions like the one I am trying to start here for instance.
There are discussions like this that I could link to. But personally, I don't find such discussions particularly useful.
> Another issue is that supposedly it can run in a browser.
I don't advise that method of deployment for JavaFX applications. A non-exhaustive list of why this is ill-advised is: browser based deployment of Java based applications increases the potential security attack surface of a client machine, is not supported on numerous common browsers (such as Safari on iOS), does not provide the application developer with complete control over the runtime environment of their application (the user can upgrade their Java version at any time, potentially breaking the application).
> Are there any demos I can find?
Not for browser based deployment, mainly for the reasons provided above.
> Also, it has support for touch/multitouch events. What exactly are those for
For handling input on devices which have touch pads and touch screens.
> how is a JavaFX app going to run on a multitouch device?
Depends on the deployment model. Normally, I recommend packaging and installing the JavaFX application (with a private java runtime) using the native packaging for the platform (e.g. .exe or .msi installer on windows, .dmg on OS X, .rpm or .deb on linux, .apk for android, etc). So you install and run the package on the target system just the way you would install any native application for that system and the JavaFX application will accept and respond to input from the multitouch device (e.g. if you click and drag on laptop touch pad, then your application will receive a click and drag event that it can respond to).
> Its practically impossible to develop for android or iOS
I disagree, many people develop for Android and iOS.
> Java doesnt have a native platform (on desktops or mobiles)
The native platform for Java is the Java Runtime Environment (JRE), it's a virtual machine which can run on many devices. You can use a JRE pre-installed on on the machine or, (my preferred method), include a runtime in your application installation package.
> Maybe microsoft surface?
Sure, you can run JavaFX applications on the more recent surface machines which use an Intel based architecture.
> Why wouldnt I use C# or VB for windows only apps?
You could, that is up to your personal preference and the technical requirements of what you need to get accomplished.
> Will JavaFX apps run "natively" on windows 10 phones?
I have never heard of anybody running JavaFX 2.x+ on a Windows Phone. Windows 10 doesn't launch until late 2015. I do not know if somebody will run a JavaFX application on Windows 10 once it has been released.
> JavaFX is only good for old fashioned GUI desktop apps
Desktop/Laptop based operating systems (OS X, Linux, Windows) are the primary development use-cases for JavaFX. They are the only environments which are officially supported by Oracle.
JavaFX based applications do work on a variety of non-desktop devices such as Raspberry PIs, android and iOS phones, etc. and development on these platforms is supported to a greater or lesser degree through third party sites such as javafxports.
> which can be made with any other framework or language.
Yes, you have a choice of implementation technology for your applications.
> SceneBuilder (which also hasnt been updated in a year...)
Oracle no longer support SceneBuilder binary releases.
Binary releases are provided by the third party Gluon. Gluon have provided new releases of SceneBuilder within the last year.
> The FXML cant be automatically injected and I just have to paste the sample controller any time I make a change or simply redeclare the nodes by hand in the controller which is just so awkward
Yes, that is mildly annoying to me.
Systems of JavaFX development based on alternate languages such as
jrubyfx can perform automatic injection of FXML into ruby code. Unfortunately, I am unaware of a similar solution for development based on the Java language.
> Also for some reason I am getting a NoSuchMethodException when accessing nodes declared by @FXML in the controller which work just find if I declare them as Node_Type Node_Name = (Node_Type) root.lookup("#Node_Name"); Whats up with that?
Lookups are based upon a CSS selector operation applied to a node/object hierarchy in the scene graph. The CSS attributes for nodes get finally assigned to the nodes during a CSS application pass. By default the CSS application pass happens
during a pulse, which, by default will occur sixty times a second. If you try to perform a CSS based lookup of a node before a pulse has been processed for that node and CSS applied for it, then the lookup may fail. You can manually trigger a CSS pass by invoking applyCSS on a transitive parent of a node: sample code for this is provided in the
node.applyCSS() javadoc. However, your error seems more fundamental than just not applying CSS before doing the lookup. You shouldn't be getting NoSuchMethodException when calling root.lookup if root is a node, (as
lookup is a method of node). So probably whatever your root object is, it is not a Node. If you still have issues with this, you can create an
mcve and post it on StackOverflow to request further help.
Even with the above said, I don't know why you would do this in the first place. I usually don't recommend using the node.lookup functionality if you can avoid it (because of the confusing semantics around applyCss and because lookups are not strongly typed, so you lose some of the benefits of typed Java development). If you have a node in the controller annotated with @FXML, the FXMLLoader will inject a reference to the node into your controller class. So you can directly reference the node through the injected reference rather than using a lookup - so in this case the use of a node lookup function would seem to be completely avoidable.
> general sense of decadence
I don't think decadence is the
word you are looking for here.
> I would appreciate any thoughts on any of the points I made.
You should make your decisions on technology to use based upon your own honest assessment of the technology and how it applies to what you want to achieve and what most interests you.