JavaFX vs OpenGL(JOGL)? Java SE vs Java EE vs JavaFX?

sorry if putting 2 questions like this is against the rules, but they have to do with each other....

I want to know how the graphical capabilities of JavaFX compare to JOGL? I also read that you can mix the 2 so i want to know if you are designing a business appication used by industry professionals and you have OpenGL code would it be better to use Java SE, EE, or FX? How does FX compare to the others? Are there any disadvantages to using FX over either of the others?

No one? I would really like to know if it's worth it to go to JOGL? It seems like support is very little and only supported by volunteers... It is very weird since Sun created both.... is FX the new wave for 3D rendering and programming?

If you look at the main page for the JavaFX forum here you will notice it doesn't get a lot of traffic (posts on the first page from April last year)
Have you tried the Oracle JavaFX forum ? That seems a bit busier.

JOGL is a low-level API for working with 3D graphics; it's more or less a direct mapping of OpenGL functions to Java. JavaFX is a much higher-level API. As such, JOGL and JavaFX are not directly comparable.

So EE doesn't deal with Client side? So in essence you would use SE with EE if you want Client-Server?

Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958

73

posted Jul 07, 2012 00:21:49

0

Jay Orsaw wrote:So in essence you would use SE with EE if you want Client-Server?

That depends on your definition of "client-server". But JEE consists of server-side APIs. While there may be occasional use of some of its APIs (like JMS or JavaMail) on the client, that is the exception.

The technologies you mention cater to different aspects of an application and cannot replace each other. There is no good comparison between them.

JOGL: Java alternative to OpenGL. Open Graphic language is used to tell a graphic card hardware to draw graphics. Graphics card driver is written using C/C++ . Java programmer cannot call those C/C++ routines so easy. ( Of course Java has a huge Graphics library and you can draw pretty much anything on screen using pure Java. But it is a tedious job and will run slow on your CPU, making no use of Graphics hardware). That's where JOGL comes to rescue, it translates your Java instructions to OpenGL instructions that your Graphics hardware understands.

JavaFX : Java alternative to Flash. Its a newer platform. It's an effort to increase Java's grip on client side where Flash is used for almost all interactive web content. Its similar to flash in design but is more organized. It uses Java for programming. It allows non changing UI elements to be described in XML files. The API contains advanced functionality like shapes, transforms, animations special effects etc. New JRE's now have JavaFX runtime so it runs in your browser like flash. JavaFX will have strong competition from HTML 5 and flash, if it ever made it to mainstream web front-ends.

At various times people have written articles or blog posts or forum posts asking the question, what is JavaFX? Is it a competitor to Flash? (The answer would be No, though competing with Flex would be a Yes). Is it a competitor to Silverlight? (The answer would be Yes, for some use cases). Is it a replacement for Swing? (The answer would be an emphatic Yes).

I think at its heart, JavaFX is about application development. Good old fashioned native application development. The sorts of things you see in the iOS app store, or Android app stores, or that you install on your desktop. Think money management, banking, data visualization, entertainment, data entry, etc, etc. It isn’t competing with the web, unless you also think that native apps are competing with the web (in some sense, yes, but in a larger sense, no) . . . I don’t see any competition between “the web” or HTML and JavaFX. In fact, JavaFX ships with the WebView which allows you to integrate FX and Web content seamlessly. Users won’t even know which is which.

JavaFX can use OpenGL for hardware accelerated graphics, but it can also use DirectX, Java2D and a combination of software and hardware based rendering techniques which depend on the operating system, graphics libraries and drivers and hardware available. I could be wrong here, but I don't think JavaFX uses JOGL, but instead defines it's own wrapper for OpenGL in the cases that it uses it. See the JavaFX architecture slides: http://docs.oracle.com/javafx/2/architecture/jfxpub-architecture.htm

JavaEE does have (non-web) client deployment components - they are just not much used. As clients are definitely a part of enterprise computing, perhaps in the future further integration and inclusion of JavaFX technologies in JavaEE and vice versa may occur. For instance, the beans validation jsr of jee is being examined by some for inclusion as a validation mechanism for JavaFX and the JavaFX property mechanism may prove generally useful in the JEE server world. But, for now, as you point out, these things exist largely as separate pieces of technology.

spar mc
Greenhorn

Joined: Jul 30, 2012
Posts: 5

posted Aug 02, 2012 07:43:50

0

Upto version 1.3 JavaFX worked with JOGL. Now they have their own OpenGL Wrapper.

Hi, I'm new on the forum and coming back to Java after many years in MS land. I'm trying to get caught up on all the latest Java developments and was wondering if perhaps HTML5 + Javascript might be the preferred client side development tools over JavaFX unless your doing some fancy graphics. I noticed that Netbeans 7.3 beta is featuring new HTML5+Javascript capabilities and was thinking that might be the way to go for standard display/data entry type of screens. Thanks!

EDIT: It's great to be here but after reviewing the Netbean docs further, I believe I need to do further reading on this subject.

For some app types html5 is a better choice, for other app types JavaFX is a better choice, note that both can be mixed (either JavaFX panels inside a HTML page or a JavaFX app with embedded HTML pages), so it's not necessarily an either/or thing.

For some app types html5 is a better choice, for other app types JavaFX is a better choice, note that both can be mixed (either JavaFX panels inside a HTML page or a JavaFX app with embedded HTML pages), so it's not necessarily an either/or thing.

Thanks so much, John. Every one of those links were, and are going to be extremely helpful to me. One thing I saw that I think is super cool is the hardware acceleration they are supporting in JavaFX. http://docs.oracle.com/javafx/2/system_requirements_2-2/jfxpub-system_requirements_2-2.htm I'm a long way from using that in my own development but that's really awesome. My desktop is too old but I've got a new notebook that might support that. I was also interested that they saw JavaFX as a replacement for Swing going forward. It's always good to know those kind of plans going forward.

I was also interested in this quote on the Project Avatar page:

And of course, unifying ME and EE means agreeing on JSON as a communication mechanism for passing objects back and forth. And it also means leveraging Web Sockets for bi-directional interactions between clients and servers, while supporting both online and offline communication modes. And with these technologies agreed upon, interoperability and communication between handheld devices, web based applications and enterprise applications hosted on the cloud will become greatly simplified.

Would you say that if I loaded up EE on my machine (I currently have SE), I should use Glassfish if I want to play around with the JSON? Thanks for your time, and I'm certainly glad I found this board.

Mitesh Aegis wrote:I think, JavaFX is about application development. Good old fashioned native application development. The sorts of things you see in the iOS app store, or Android app stores, or that you install on your Desktop.

Thanks!

No, that's not what JavaFX is. JavaFX is a Java API for developing GUIs, can be launched in a browser and a version for portable devices is expected to be available sometime.

Well it's nice to hear it has it's own Open GL Wrapper, because it honestly seems to be better than using the open source JOGL(updated 4 years ago) or the LWJGL(which has a lot of extra stuff not needed for gaming).... ALso since FX is supported by Oracle I think it's the safest bet to go with. JOGL 1 to 2 has a crap ton of changes which is not cool to those who have used the older code. Since FX went from scripting to a full blown API for Java we shouldn't see much changes to the actual code anymore imo... Lets hope when FX 3 comes out we will see some amazing new features. I'm extremely impressed with what has been shown lately. The capabilities are amazing! It's also good that it uses DirectX so having the best of both worlds is good, especially for cross platform.

Not sure if I asked this before but can SE/EE be used with FX? or will you only use one or the other?

Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958

73

posted Nov 03, 2012 03:23:47

1

Jay Orsaw wrote:Not sure if I asked this before but can SE/EE be used with FX? or will you only use one or the other?