aspose file tools*
The moose likes JavaFX and the fly likes JavaFX vs OpenGL(JOGL)?  Java SE vs Java EE vs JavaFX? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JavaFX
Bookmark "JavaFX vs OpenGL(JOGL)?  Java SE vs Java EE vs JavaFX?" Watch "JavaFX vs OpenGL(JOGL)?  Java SE vs Java EE vs JavaFX?" New topic
Author

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

Jay Orsaw
Ranch Hand

Joined: Jun 14, 2011
Posts: 356

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?
Jay Orsaw
Ranch Hand

Joined: Jun 14, 2011
Posts: 356

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?
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3654
    
  15
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.


Joanne
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14269
    
  21

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.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Jay Orsaw
Ranch Hand

Joined: Jun 14, 2011
Posts: 356

https://forums.oracle.com/forums/thread.jspa?messageID=10440389#10440389

So far it seems like JavaFX has a ways to go in the 3D world.


But another question is why would 1 use FX over EE or SE?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42277
    
  64
You would use FX with SE - EE are server-side APIs, where GUI stuff isn't really applicable.


Ping & DNS - my free Android networking tools app
Jay Orsaw
Ranch Hand

Joined: Jun 14, 2011
Posts: 356

Ulf Dittmer wrote:You would use FX with SE - EE are server-side APIs, where GUI stuff isn't really applicable.


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

Joined: Mar 22, 2005
Posts: 42277
    
  64
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.
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1085
    
  10

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


EE includes JSP/JSF/Servlets and EJB, Web Services too...
so, you could use a complete EE stack where you use say JSF + HTML 5 on the client side for UI and EJB on the server side.

On the other hand, you could choose to use JavaFX for the UI part and use EJB/Web Services from the EE stack on the server-side.


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
spar mc
Greenhorn

Joined: Jul 30, 2012
Posts: 5
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.

JavaFX vs JOGL : this is not a sensible comparison, JavaFX uses JOGL for hardware accelerated graphics.

JavaEE : Is Java API for enterprise, Server side, You don't use JavaFX and JOGL here.
JavaSE: Is Java API for general purpose desktop apps, browsers, front-end. You use JavaFX and JOGL here.
John Damien Smith
Ranch Hand

Joined: Jan 26, 2012
Posts: 145
    
    9
spar mc, I don't think this is the best definition of these technologies.
I do agree that the technologies mentioned are largely complementary.

Here is a quote defining JavaFX from the Java Client Technologies head at Oracle (http://fxexperience.com/2012/06/javafx-the-10000-foot-view):

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
Upto version 1.3 JavaFX worked with JOGL. Now they have their own OpenGL Wrapper.
Bob Scott
Ranch Hand

Joined: Oct 04, 2012
Posts: 40

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.
John Damien Smith
Ranch Hand

Joined: Jan 26, 2012
Posts: 145
    
    9
Hi Bob,

The best background reading to give insight into the bigger picture for JavaFX is: http://fxexperience.com/2012/06/javafx-the-10000-foot-view/

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.

Try the Ensemble sample to get hands on understanding of JavaFX's capabilities: http://www.oracle.com/technetwork/java/javafx/samples/index.html
JavaFX tutorials are the best source of online JavaFX documentation: http://docs.oracle.com/javafx/

- John
Bob Scott
Ranch Hand

Joined: Oct 04, 2012
Posts: 40

John Damien Smith wrote:Hi Bob,

The best background reading to give insight into the bigger picture for JavaFX is: http://fxexperience.com/2012/06/javafx-the-10000-foot-view/

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.

Try the Ensemble sample to get hands on understanding of JavaFX's capabilities: http://www.oracle.com/technetwork/java/javafx/samples/index.html
JavaFX tutorials are the best source of online JavaFX documentation: http://docs.oracle.com/javafx/

- John


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.

Bob
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4642
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
Jay Orsaw
Ranch Hand

Joined: Jun 14, 2011
Posts: 356

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
Marshal

Joined: Mar 22, 2005
Posts: 42277
    
  64
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?

See my first post in this topic.
Jay Orsaw
Ranch Hand

Joined: Jun 14, 2011
Posts: 356

Ulf Dittmer wrote:
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?

See my first post in this topic.


Thanks ulf. Btw I fixed my Applet issue, so mad, still konfused a bit though... Stupid Codebase....
 
Consider Paul's rocket mass heater.
 
subject: JavaFX vs OpenGL(JOGL)? Java SE vs Java EE vs JavaFX?