Opinionated JavaFX 8


Speaker: Adam Bien

How to build an app with Java FX? WYSIWYG or manual hacking? How to integrate with Java EE backend? What is a Presenter, Controller or a View? Do we need data binding?
In this virtual session I would like to introduce you to Java FX 8 from the application perspective with focus on structure, architecture and (software) design.

Speaker: Adam Bien

Consultant and author Adam Bien is an Expert Group member for the Java EE 6 and 7, EJB 3.X, JAX-RS, and JPA 2.X JSRs. He has worked with Java technology since JDK 1.0 and with Servlets/EJB 1.0 and is now an architect and developer for Java SE and Java EE projects. He has edited several books about JavaFX, J2EE, and Java EE, and he is the author of Real World Java EE Patterns—Rethinking Best Practices and Real World Java EE Night Hacks—Dissecting the Business Tier. Adam is also a Java Champion, Top Java Ambassador 2012, and JavaOne 2009, 2011, 2012 and 2013 Rock Star. Adam occasionally organizes Java EE workshops at Munich’s airport (http://airhacks.com).

IRC Logs from the session

17:02 <sjmaple> ok, starting now…
17:02 <keuleJ> 🙂
17:02 <carljokl> FatLorenzo seems a bit mean, couldn’t you go with “CuddlyLorenzo”?
17:02 <calvin> CalvinB
17:02 <theotown> Hey folks! Starting now 🙂
17:02 <Surendra> Hi
17:03 <Surendra> Can you please do sound check for me?
17:03 <Surendra> This is my first session
17:03 <CalvinB> Welcome
17:03 <carljokl> Starting…
17:04 <carljokl> An error occurred….try again later?
17:04 <keuleJ> same here
17:04 <lawpro> here too
17:04 <Ivander> same here
17:04 <carljokl> I have audio now
17:04 <carljokl> And video
17:09 <Surendra> I am from windy city
17:09 <Surendra> what is champion
17:09 <carljokl> Someone who is victorious
17:09 <justjavadevelope> lol
17:09 <radcortez> hi guys
17:09 <Guest64796> I do not hear anything and to the left I only see a window with ‘Now I have a problem factory’ (I clicked on ‘Live Session)
17:09 <sjmaple> hmmm, try a refresh of the page if you’re having problems – let me know if you’re still having issues now
17:10 <slaskawi> Surendra: https://java-champions.java.net/
17:10 <Handir_> Try the Youtube Stream: https://www.youtube.com/watch?v=W-ezZqeGQ6Y
17:10 <theotown> Try refreshing the page
17:10 <carljokl> I am hoping to use JavaFX potentially as a cross platform UI api for Open Wonderland if it is practical to do so
17:10 <carljokl> Or at least a subset of it
17:10 <Guest64796> I look at youtube. thank you!
17:10 <Marcszy> Already shared, hoping to have 4 joiners within the weekk.
17:10 <carljokl> Birthday…will there be cake……iBake….
17:10 <Marcszy> *week
17:10 <lawpro> any body having audio problems?
17:10 <Marcszy> no, I’m good
17:10 <FatLorenzo> audio works perfect for me too
17:10 <carljokl> I have good audio
17:10 <radcortez> hum adam face is covered with the hangout faces 😛
17:11 <sjmaple> Guest64796: ahhh, probably an older cache… maybe this link will be better- http://virtualjug.com?no-cache
17:12 <sjmaple> radcortez: hmm, I wonder if that’s something I can change here…
17:12 <gravadlax> yep
17:13 <gravadlax> go away faces
17:13 <theotown> I saw “feces” at first. Mini freakout avoided…
17:13 <justjavadevelope> adam, maybe move 30cm to your right!
17:13 <radcortez> lol
17:13 <gravadlax> sometimes we can see his eyes
17:13 <carljokl> Censorship…reminds me of Mike on Monster’s Inc
17:13 <theotown> I’ll be leaving soon folks, that might help!
17:15 <Marcszy> yay!
17:15 <carljokl> Yay
17:15 <gravadlax> wooo!
17:15 <carljokl> Video has cut out for me
17:15 <FatLorenzo> oh 🙁
17:15 <Marcszy> me too
17:15 <gravadlax> lost here
17:15 <carljokl> Did it for anyone else?
17:15 <Handir_> me too
17:15 <lawpro> yep yuep
17:15 <jshickey> me too
17:15 <gravadlax> +1
17:16 <gravadlax> Somebody reboots Hangouts
17:16 <carljokl> *kicks the box*
17:16 <sjmaple> trying to reboot now
17:17 <carljokl> What we need is some kind of Champion to save the day
17:17 <carljokl> I see Simon
17:17 <huxendupsel> ok is see simon
17:17 <lawpro> where is Adam?
17:17 <vasouv> can see and hear
17:18 <slaskawi> sjmaple: Yes, we can
17:18 <FatLorenzo> jepp
17:18 <jshickey> can hear and see
17:18 <justjavadevelope> yep
17:18 <dennisk1718> see you
17:18 <huxendupsel> reboot was good,
17:18 <rarchibald> Can see and hear
17:18 <dennisk1718> still ugly as ever 😉
17:18 <gravadlax> 🙂
17:18 <huxendupsel> 😀
17:18 <carljokl> Not that you are bad to look at or anything
17:18 <carljokl> But…JavaFX
17:18 — gravadlax is preparing diner
17:19 <huxendupsel> click, click sounds promissing
17:19 <gravadlax> no pressure… only 50+ people watching
17:19 <keuleJ> take it easy
17:19 <FatLorenzo> when he’s connected again his javafx app is fully implemented;-)
17:19 <keuleJ> these things happen…
17:20 <Surendra> I can hear and see you Simon
17:20 <carljokl> How long is this session by the way?
17:20 <amorfis2> It’s _virtual_ JUG, so it can always happen.
17:20 <huxendupsel> make a pone call 😀
17:20 <keuleJ> maybe call an IT guy 😉
17:21 <carljokl> I don’t know if anyone is interested in coming to my session afterwards
17:21 <carljokl> It is a bit niche interest though
17:21 <gravadlax> skype?
17:21 <manocha_ak> joined late… looks like I havent missed anything???
17:21 <FatLorenzo> which session @carljokl?
17:21 <sjmaple> we’re back – few!
17:21 <justjavadevelope> whats ur session about carl?
17:21 <carljokl> http://blogs.openwonderland.org/2014/08/17/mobile-strategy-community-meeting/
17:22 <carljokl> I am talking about the future of Open Wonderland particularly developing new mobile clients for it
17:22 <carljokl> I would actually like to use JavaFX APIs for cross platform UI if it is feasible to do so.
17:23 <carljokl> I am not sure if licencing restrictions around using JavaFX might prevent creating my own implementation
17:23 <carljokl> Especially given Oracle vs Google lawsuits
17:23 <keuleJ> Nice to see you Adam!
17:24 <amorfis2> @carljokl JavaFX was meant for cross-platform, but I don’t know if this ideas are implemented.
17:24 <sjmaple> carljokl: Adam might know, I’ll ask at the end
17:25 <manocha_ak> javafx is being supported on MAC Windows and Ubuntu 10+ as I know
17:25 <carljokl> That is why I favour JavaFX
17:25 <carljokl> Sun originally designed it to “Run across all the screens of your life”
17:25 <hendrikebbers> there are ports for Android and iOS: http://javafxports.org
17:25 <carljokl> Therefore it was designed to be platform / device agnostic
17:26 <carljokl> Cool
17:26 <carljokl> Worth considering
17:26 <FatLorenzo> and also for iOS via RobotVM as far as I know
17:27 <carljokl> No lawsuit problems or cease and desists?
17:28 <psychollek> I wasn’t listening enough, but is this injector part of afterburner ?
17:29 <hendrikebbers> yes
17:29 <manocha_ak> why view needs to have more than one controller ? are you hinting toward single page app?
17:29 <manocha_ak> dektop app*
17:29 <huxendupsel> is there a mechanism in javafx, which layouts the gui pixel independent, so that changing the screen size doesn’t have any impact?
17:30 <psychollek> at least in 1.0 you could use svg for layouting 😛
17:30 <carljokl> I guess it never hurts to “Consult the Oracle”
17:31 <sjmaple> that sometimes hurts the most 😉
17:31 <carljokl> Ok true
17:31 <carljokl> They might try and sell me Exadata but I really can’t afford one anyway
17:32 <vasouv> well that’s why my single controller is huge, 3 different panels but one controller to rule them all…
17:32 <sjmaple> mwahaha
17:32 <vasouv> i’ll follow the multi-controller notion
17:34 <keuleJ> yes, does javaFx support HiRes displays?
17:34 <hendrikebbers> Mac Retina is supported
17:37 <sjmaple> any other questions at the moment?
17:39 <keuleJ> did you ever have problems in your project with the xml-handling?
17:39 <keuleJ> e.g. did you have to edit the xmls by hand ?
17:40 <hendrikebbers> you can use sceneBuilder
17:40 <keuleJ> and no way to mess it up? so that you have to “repair ” it?
17:45 <manocha_ak> slightly offtopic may be… so how to go about using javafx with afterburner in an alreay existing swing project?
17:46 <hendrikebbers> JavaFX provides a component called JFXPanel. You can add any JavaFX scene graph in a swing app by using this wrapper
17:47 <tocsa> That archetype is great
17:48 <carljokl> I will probably need to sneak off soon
17:48 <carljokl> *sneaking*
17:51 <amorfis2> From JavaFX you create executable file, right? Can you also create an applet, and embed it on html page?
17:52 <amorfis2> (Actually, I _know_ you can embed it, but is it really an applet? Or smth else? )
17:55 <FatLorenzo> what does ::add mean – I’ve never seen it in Java code before
17:56 <sjmaple> it’s a method reference
17:56 <amorfis2> Java 8 feature
17:56 <sjmaple> can be used in lambdas
17:56 <sjmaple> Check out some of our previous sessions afterwards to see more about them… I’ll find a link
17:56 <FatLorenzo> ah ok – I’m a poor guy I’ve to use Java 1.4.2 at work
17:57 <FatLorenzo> thanks
17:57 <keuleJ> @FatLorenzo: not even Java 5?!
17:57 <sjmaple> http://virtualjug.com/project-lambda-functional-prog-constructs-and-simpler-concurrency-in-java-se-8-by-simon-ritter/
17:58 <FatLorenzo> @keuleJ hopefully beginning at October
17:58 <keuleJ> We have Java 7 for Client and Java 6 for Server
18:00 <amorfis2> @FatLorenzo I once worked for an African bank, and I can’t imagine more rigid institution. But we used java 6 there. I wonder where do you work…
18:00 <FatLorenzo> that’s the reason why I’ve joined vJUG to learn new fancy things 😀
18:01 <FatLorenzo> the reason is the platform which I’m developing for is java 1.4.2 based and the vendor has it’s own jvm implementation
18:01 <keuleJ> Is it no Problem to create JavaFx components on otther threads than the javafx application thread?
18:01 <sjmaple> mmmm, IBM 🙂
18:02 <FatLorenzo> almost SAP
18:02 <sjmaple> close enough 🙂
18:02 <FatLorenzo> lol
18:03 <lawpro> would the code for the hack be avaialble somewhere?
18:04 <sjmaple> any other questions right now?
18:05 <amorfis2> Can you embed JavaFX on html pages?
18:06 <amorfis2> Is it an applet then?
18:06 <vasouv> how are the properties files used? let’s say read values instead of the user inputting them?
18:07 <dennisk1718> any thoughts on JSR 365
18:07 <tocsa> Starred the github
18:08 <sjmaple> https://github.com/adambien/afterburner.fx
18:10 <Struppy> What is needed on the Client to run JavaFX in the browser?
18:10 <amorfis2> So you can control DOM elements from JavaFX app? Ok, but JavaFX scene is not DOM element, is it? So how can you show it?
18:11 <dennisk1718> CDI
18:13 <sjmaple> hah, thanks dennis 🙂
18:16 <dennisk1718> Thank You
18:16 <sjmaple> np, any final questions?
18:16 <keuleJ> Everything singleton:
18:17 <keuleJ> You could have multiple tabs, which show the same view
18:17 <keuleJ> with different data
18:19 <JonasHavers> Do you have any suggestions for creating responsive layouts or a responsive design in JavaFX applications?
18:20 <keuleJ> @JonasHaves: good question
18:21 <Struppy> As far as I saw the JavaFX plugin in the browser is an applet. Is this correct?
18:21 <keuleJ> Is JavaFx the right tool for writing enterprise applications with lots of forms and tables?
18:23 <JonasHavers> @Adam: No, never asked it before 😉
18:24 <sjmaple> :
18:24 <sjmaple> 🙂
18:25 <JonasHavers> Thanks @ sjmaple for asking!
18:25 <vasouv> very nice session, thank you 🙂
18:25 <dennisk1718> Thanks again
18:26 <Milan> Great presentation. Thanks!
18:26 <huxendupsel> thank you it was great
18:26 <sjmaple> thanks for joining everyone!
18:26 <tocsa> Lots of info to interpret on my part
18:27 <tocsa> Thanks!
18:27 <keuleJ> thanks
18:27 <dennisk1718> Who is next weeks speaker?
18:27 <vasouv> got to rewatch it at a slower pace 😛 adam speaks fast
18:27 <amorfis2> Thanks!
18:28 <sjmaple> Richard Warburton and Raoul http://www.meetup.com/virtualJUG/events/199187962/
18:28 <dennisk1718> -tx
18:28 <sjmaple> hehe, our replay should be online real soon here – http://virtualjug.com/opinionated-javafx-8/
18:28 <sjmaple> in fact, available now 😀
18:30 <vasouv> good bye people, see ya next time