Successfully reported this slideshow.
Your SlideShare is downloading. ×

JavaFX JumpStart @JavaOne 2016

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 44 Ad

JavaFX JumpStart @JavaOne 2016

Download to read offline

Writing a "Hello World!” application is always easy, and a Java developer can learn how to write it with JavaFX in some minutes. But if you want to create a productive application, knowledge of "Hello World!” isn't enough. A real application should be well structured, provide an automatic build that ends in usable artifacts, and contain only needed dependencies. In addition, such an application should be testable and maintainable. This session presents some general concepts regarding how you can create and structure a JavaFX application that can easily grow and become more complex without losing control of the code, functionality, and maintainability. At the end, each attendee will have a template to use to start creating JavaFX-based applications.

Writing a "Hello World!” application is always easy, and a Java developer can learn how to write it with JavaFX in some minutes. But if you want to create a productive application, knowledge of "Hello World!” isn't enough. A real application should be well structured, provide an automatic build that ends in usable artifacts, and contain only needed dependencies. In addition, such an application should be testable and maintainable. This session presents some general concepts regarding how you can create and structure a JavaFX application that can easily grow and become more complex without losing control of the code, functionality, and maintainability. At the end, each attendee will have a template to use to start creating JavaFX-based applications.

Advertisement
Advertisement

More Related Content

Slideshows for you (20)

Viewers also liked (20)

Advertisement

Similar to JavaFX JumpStart @JavaOne 2016 (20)

More from Hendrik Ebbers (20)

Advertisement

Recently uploaded (20)

JavaFX JumpStart @JavaOne 2016

  1. 1. JavaFX canoo
  2. 2. About me Java Champion JavaOne Rockstar Canoo Engineering AG JCP Expert Group JUG Dortmund Star Wars www.guigarage.com@hendrikEbbers canoo
  3. 3. Hello Worldwww.guigarage.com@hendrikEbbers canoo
  4. 4. Hello Worldwww.guigarage.com@hendrikEbbers canoo JavaFX is PLAIN JAVA NO JavaFX Script Write it with any Java IDE ... or go oldschool never use this one ;)
  5. 5. Hello Worldwww.guigarage.com@hendrikEbbers canoo 1 - Create a Class 2 - Extend Javafx.application.application 3 - Have Fun
  6. 6. Hello Worldwww.guigarage.com@hendrikEbbers canoo public class HelloWorld extends Application { @Override public void start(Stage primaryStage) { StackPane myPane = new StackPane(new Button("Hello World")); primaryStage.setScene(new Scene(myPane)); primaryStage.show(); } public static void main(String[] args) { launch(args); } }
  7. 7. Hello Worldwww.guigarage.com@hendrikEbbers canoo Stage Scene StackPane Button Scenegraph contains
  8. 8. Hello Worldwww.guigarage.com@hendrikEbbers canoo public class Demo extends javafx.application.Application { @Override public void init() {} @Override public void start(javafx.stage.Stage stage) {} @Override public void stop() {} public static void main(String[] parameters) { launch(parameters); } } application.init() application.start(Stage) application.stop() stage.close()
  9. 9. stuck in the IDE www.guigarage.com@hendrikEbbers canoo
  10. 10. stuck in the IDE www.guigarage.com@hendrikEbbers canoo Netbeans Project Eclipse Project
  11. 11. stuck in the IDE www.guigarage.com@hendrikEbbers canoo
  12. 12. stuck in the IDE www.guigarage.com@hendrikEbbers canoo 😥 😭 😱 😰 😵
  13. 13. stuck in the IDE www.guigarage.com@hendrikEbbers canoo 😥 😓 😨 😰 😵 😭 😱
  14. 14. stuck in the IDE www.guigarage.com@hendrikEbbers canoo ?
  15. 15. Project management www.guigarage.com@hendrikEbbers canoo
  16. 16. www.guigarage.com@hendrikEbbers canoo Describe the application in an Environment independent way Project management
  17. 17. www.guigarage.com@hendrikEbbers canoo 1 - Define Java Version in Build file 2 - Define Dependencies in Build File I like to to this in a static way… Project management
  18. 18. www.guigarage.com@hendrikEbbers canoo JavaFX and Maven Project management a perfect match
  19. 19. www.guigarage.com@hendrikEbbers canoo Project management <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
 <modelVersion>4.0.0</modelVersion>
 
 <groupId>com.guigarage</groupId>
 <artifactId>javafx-application</artifactId>
 <version>1.0-SNAPSHOT</version>
 
 <properties>
 <maven.compiler.target>1.8</maven.compiler.target>
 <maven.compiler.source>1.8</maven.compiler.source>
 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 </properties> 
 </project>
  20. 20. www.guigarage.com@hendrikEbbers canoo You have to choose Project management
  21. 21. www.guigarage.com@hendrikEbbers canoo Native Builds Project management Providing a JAR to customers sucks Since Java 8 we can go Native EXE & DMG
  22. 22. www.guigarage.com@hendrikEbbers canoo Native Builds Project management JavaPackager is part of JDK Oracle Provides ANT support Maven & Gradle Support by Community
  23. 23. www.guigarage.com@hendrikEbbers canoo Native Builds Project management
  24. 24. www.guigarage.com@hendrikEbbers canoo Native Builds Project management simply add nativecontent to your project
  25. 25. www.guigarage.com@hendrikEbbers canoo Test Support Project management USe TestFX to write JavaFX test Tests automatically boot your UI Headless Tests supported
  26. 26. Build pipeline
  27. 27. Build pipeline Deploying an productive app ... from your local machine is like ...
  28. 28. Build pipeline Deploying an productive app . . . from your local machine is like
  29. 29. Build pipeline Deploying an productive app . . . from your local machine is like
  30. 30. Build pipeline Deploying an productive app . . . from your local machine is like
  31. 31. Build pipeline Deploying an productive app . . . from your local machine is like
  32. 32. Build pipeline Just to make sure you get it ...
  33. 33. Build pipeline Deploying an productive app . . . from your local machine is like
  34. 34. Build pipeline Deploying an productive app . . . from your local machine is like All together now
  35. 35. Build pipeline Deploying an productive app ... from a Build server is like ...
  36. 36. Build pipeline Deploying an productive app . . . from your local machine is like
  37. 37. Build pipeline Using a Build server is quite easy It's really the same than for any other Java project Remember: JavaFX == Java choose your favorite
  38. 38. Build pipeline Works for Open Source, Too It only takes 5 minutes to setup a Travis Build for your GitHub repo +
  39. 39. Build pipeline Native Builds You need build notes for the different platforms Build server Linux build node Mac build node Windows build node trigger builds
  40. 40. JavaFX on Mobile
  41. 41. www.guigarage.com@hendrikEbbers canoo JavaFX Mobile Simply Install IDE Plugin Create a new Project Run JavaFX on Mobile
  42. 42. www.guigarage.com@hendrikEbbers canoo WAIT! DON'T We stuck in the IDE now???? JavaFX on Mobile
  43. 43. www.guigarage.com@hendrikEbbers canoo Gradle Build
  44. 44. questions?

×