Talk about the thoughts of JavaFX development

Source: Internet
Author: User

Starting with the first JavaFX release released in 2008, over the years, the use of free time for JavaFX learning and development, as well as the idea of using JavaFX for game development, began.

However, it is decided to temporarily stop the development of JavaFX games, and only use JavaFX as a Java GUI to develop its own tools and software, unless there are significant updates and changes to the status of Oracle.

Below I will talk about some of the problems encountered in JAVAFX development, as well as the deficiencies and drawbacks compared to several other technologies.

The first question, naturally, is why I choose to use JavaFX?

The reason is simple, for most people who want to use JavaFX, there is only one reason: they are javaer.

Starting from college I was self-taught Java, the University of Java has done a variety of games, software, after graduation engaged in Android development work, and later interested in Unity3d, to Unity3d development, during the C # project, also done a few C + + projects, But in a way, Java is the language I'm most familiar with. You can say, "language is just a tool, what the project needs to do", but there's no denying that every developer has its own most familiar and favorite development language and tools.

Just as the developers of C # will use Silverlight, most Java developers will choose JavaFX. But for Microsoft's followers, it's still a tough one. Microsoft's technology updates soon, almost 3 years or so will be discarded, re-development. From WINFORM,WPF, to sliverlight (in fact Sliverlight has been abandoned by Microsoft). Because WP8 game development technology XNA has been abandoned by Microsoft, so WP8 a big innovation is also inevitable results. Fortunately, Microsoft has deep pockets, and does not rely on this to get rich.

JavaFX became available from the end of 08, when Sun was acquired in the middle, and later in the 2.x version.

Of course, for Oracle today, Java is nothing, and JavaFX is nothing. Currently, both JDK and JavaFX have open source projects Openjdk,openjfx.

This also led to a lot of problems, last year because of the JDK successive burst of major loopholes, causing JDK8 postponed six months release. In addition, from JavaFX, OPENJFX has been a long time no significant update, 3D does not count. Because JavaFX 3D is currently almost impossible to fully apply to the project, a lot more than its excellent mature 3D technology, show tease will choose it. And OPENJFX has a lot of branches, the 3D module is a separate branch of the development, there is a javafxports, mainly for JavaFX on the mobile platform Android and iOS running research.

However, even the steps of JavaFX deployment to Android and iOS are cumbersome, and there are many API compatibility issues. In some ways, JavaFX's application to Android and iOS is now only feasible and cannot be used in any practical way.

The next issue is the focus, because Java prior to a major breach, the current Java applet must be in Java security is medium or high in the case to run, or only pop up the following dialog box.


Currently, even if it is posted to a Web site, it cannot be run without a signature issued by a formal authority (self-signed). This makes it almost impossible for ordinary developers to publish their JavaFX apps on the site.

Unless you add the specified site to the exception list yourself, such as:


Then even if you add to the site list, it will pop up the following large box:


Do you think that anyone who visits a site will do such a series of operations, a pop-up box to tell you that there is a security risk, but also stubborn to stay on this page?

I believe no one will, except the developer.

But if JavaFX is not posted on the website, it has lost the capital to compete with other technologies. After all, the better technology that can be replaced is everywhere, and JavaFX has no sense of existence.

So, without considering efficiency, JAVAFX currently has the following problems hindering development:

1.OpenJFX module more, responsible for the development of the various modules at the same time the team estimated a lot, but many are semi-finished, can not be applied. Just like the 3D module above, applied to Android and iOS, even if exported to local programs and installation package, there will be "installation package icon is difficult to modify, installation interface cannot be customized" and other issues, unless you manually use Inno setup,exe4j and other packaging, But usually the development tool is to reduce the workload, has not seen this to modify their own increase in workload.

2.Java applets have too many restrictions on the network, and the programs they develop are almost completely impossible to put on the network for everyone to use, although this is because Java requests access to local files, which leads to poor security, but why not restrict applet programs from accessing local files. It is best to do a mini SDK dedicated to network distribution programs and game development.

3. After several reductions, the JRE size is still too large. I do the unity game on the web, others can download unity's running environment and run in minutes, but downloading the JRE takes too long and nobody wants to wait too long. Moreover, the Java plug-in itself is a popular plug-in, with too few people.

4.JavaFX currently reads resources, runs on the Eclipse IDE, differs between native run and Web run. As to whether we can find a solution, I have not studied it in depth.

Of course, there are other problems that I will not list.

At present compared to the fire, that natural when belong to HTML5, but according to I run some on the market already have the demo, found that the experience on the phone is not, many of the demo only more than 10 fps, and not specifically for the mobile phone customized page, mobile phone running also have no experience to say. However, the most important advantage is that each platform can be run, even if it is not supported by flash ipad and other devices can also run, it seems that HTML5 also has a certain potential.

But Unity3d also joined the war, in the preview version of Unity3d 5, can be exported to HTML5, using WebGL. Efficiency, but also can, of course, is certainly a lot worse than native. Currently not supported mobile, I tried to run the official mobile phone example, found that can be loaded, the prompt does not support the phone, but can continue to load, run, but cannot click. But it was a matter of sooner or later, so Unity3d was also a strong competitor.

In contrast, JavaFX is less than a lot, there are a lot of differences in all aspects.

As a personal suggestion, JavaFX is a good substitute for swing, and game development is still not a good fit.

 This article isPersonaloriginal, reproduced please indicate the source,i csdn blog:http://blog.csdn.net/wingfourever Personal blog address:http://www.wjfxgame.com.

-----------------------------------------------------------------------

It's rarely written so long, but it's more and more recently that JavaFX has a lot of problems with game development, and of course it's good as a GUI technology, and I've used it to do a lot of tools and software.

How to choose depends on the choice of people.

The JavaFX tutorials will also be updated on csdn and my personal blog.

----------------------------------------------------------------------

Talk about the thoughts of JavaFX development

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.