2 Replies Latest reply: Aug 21, 2013 1:47 AM by 02fb9e27-d05b-496a-894e-31b0770710b6 RSS

    JavaFX and Java EE integration

    nickarls

      Hi,

       

        I'm toying with the idea of writing an alternative UI for a smallish Java EE 6 application (EJB3, JSF2/ICEfaces, JPA, BV) etc and I'm looking for information on how integrated JavaFX is with the Java EE. Can you bridge CDI events? Can you integrate BeanValidation definition/messages from the model? Can you use CDI conversations etc?

       

      Pointers are appreciated.

       

      Thanks in advance,

        Nik

        • 1. Re: JavaFX and Java EE integration
          jsmith

          I would place the all of those topics under the domain of advanced research experimental.

           

          I know that such things have been around in the JEE world for a while now, but you just won't find a lot of examples of integration of them with JavaFX clients at this stage.

           

          So if you use this kind of JEE technology in a JavaFX client app, be prepared to do quite a bit of green field development to get it all working in a way you want.

           

          Some resources:

          http://www.zenjava.com/series/building-jee-applications-in-javafx-2-0/ (Mainly spring, not JEE, but some concepts are similar).

          https://github.com/AdamBien/afterburner.fx (it's actually JSE injection not CDI, but again some similarities).

          FXML & JavaFX—Fueled by CDI & JBoss Weld | Javalobby (JavaFX + CDI).

          https://gist.github.com/jewelsea/4955598 (JavaFX + JDBC).

           

          I'm yet to see even a blog post on bean validation and JavaFX.

          I am sure somebody has done it, just haven't seen any info on it.

           

          JPA and JavaFX is pretty straightforward if you know both techs => it's just Java.

          But directly connecting your client to a DB is often not such a good idea (hence all of the middleware out there).

           

          If you are doing enterprisy stuff with these kind of frameworks you probably want to suck them in with a maven plugin.

           

          Captain Casa has this really weird hybrid approach to JSF + JavaFX.

           

          Personally, I think JavaFX + WebSockets is an interesting combo, especially if you are running Akka and Play server.

          WebSockets is now official JEE for JEE7 - try the Tyrus client with JavaFX (or kaazing).

          Akka and Play are not JEE, but are interesting techs especially if you embrace Scala (which you can also use in JavaFX) - that is not a recommendation for Scala...

           

          If you are looking for one integrated end-to-end stack to rule them all with a JavaFX client application framework CDI/BeanValidationEnabled/Websocket/Actor Remoting talking to a counterpart server portion - you will never find it (at least not for a few years IMO).

           

          So the above are just pointers, a complete answer is impossible.

          • 2. Re: JavaFX and Java EE integration
            02fb9e27-d05b-496a-894e-31b0770710b6

            (original author here, account messed up after attempt of getting email corrected)

             

            Thanks for the info! I was afraid of that. But one shouldn't underestimate the power of open source frameworks/project of filling voids if there is enough interest in it. And I think "full" (for some definition of full) integration between JavaFX and the "enterprisey"-components would be very interesting (for those parts where there is no architectural issue making a concept impossible). Currently, I'm not familiar with the inner workings of JavaFX to even get started with such as framework. I guess there would have to be a server-side component that would deal with remoting calls etc?

             

            Found an article The Enterprise Side of JavaFX that looks promising, have to give the series a read.