Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Real World Java 9

6.158 Aufrufe

Veröffentlicht am

This is the version of the talk given after the Java 9 release

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

Real World Java 9

  1. 1. — Trisha Gee (@trisha_gee) Developer & Technical Advocate, JetBrains Real World Java 9
  2. 2. Real World Java 9
  3. 3. Real World Java 9 • Jigsaw in Action
  4. 4. Real World Java 9 • Jigsaw in Action • The Reactive API in Java 9
  5. 5. Real World Java 9 • Jigsaw in Action • The Reactive API in Java 9 • Everything Else
  6. 6. Why Java 9?
  7. 7. Free Lunch! • Better Use of Memory • Better Performance of: • Locking • Secure Apps • Graphics • Better Use of Hardware • Better Documentation • Prettier Graphics (Windows and Linux) • Faster Compilation
  8. 8. Jigsaw
  9. 9. REPL
  10. 10. And… other things?
  11. 11. 274: Enhanced Method Handles 275: Modular Java Application Packaging 276: Dynamic Linking of Language-Defined Object Models 277: Enhanced Deprecation 278: Additional Tests for Humongous Objects in G1 279: Improve Test-Failure Troubleshooting 280: Indify String Concatenation 281: HotSpot C++ Unit-Test Framework 282: jlink: The Java Linker 283: Enable GTK 3 on Linux 284: New HotSpot Build System 285: Spin-Wait Hints 287: SHA-3 Hash Algorithms 288: Disable SHA-1 Certificates 289: Deprecate the Applet API 290: Filter Incoming Serialization Data 292: Implement Selected ECMAScript 6 Features in Nashorn 294: Linux/s390x Port 295: Ahead-of-Time Compilation 297: Unified arm32/arm64 Port 298: Remove Demos and Samples
  12. 12. The Case Study
  13. 13. Twitter Dashboard
  14. 14. http://bit.ly/Java8InAnger
  15. 15. Compiling with Java 9
  16. 16. Jigsaw
  17. 17. • JEP 200: The Modular JDK • JEP 201: Modular Source Code • JEP 220: Modular Run-Time Images • JEP 260: Encapsulate Most Internal APIs • JEP 261: Module System • JEP 282: jlink: The Java Linker • JSR 376: Java Platform Module System Project Jigsaw
  18. 18. Java Platform Module System (JPMS)
  19. 19. module-info.java
  20. 20. Pain
  21. 21. Pain • Some structural reorganisation may be needed
  22. 22. Pain • Some structural reorganisation may be needed • IDE support is not what we’re used to
  23. 23. Pain • Some structural reorganisation may be needed • IDE support is not what we’re used to • RTFM. No, really do.
  24. 24. Gain
  25. 25. • Cleaner design Gain
  26. 26. • Cleaner design • Reliable configuration Gain
  27. 27. • Cleaner design • Reliable configuration • Smaller deployables Gain
  28. 28. Reactive API
  29. 29. Reactive Streams API
  30. 30. • Akka Streams • MongoDB Reactive Java Driver • Ratpack • Reactive Rabbit  • Reactor  • RxJava • Vert.x  Implementations
  31. 31. Java 9 Flow API
  32. 32. Other Java 9 Features
  33. 33. 269: Convenience Factory Methods for Collections
  34. 34. 213: Private Methods on Interfaces
  35. 35. New Methods on the Streams API
  36. 36. New Methods on Optional
  37. 37. 259: Stack-Walking API
  38. 38. 102: Process API Updates
  39. 39. 238: Multi-Release JAR Files
  40. 40. 277: Updated Deprecation
  41. 41. 224: HTML5 Javadoc
  42. 42. 225: Javadoc search
  43. 43. JShell (REPL)
  44. 44. https://docs.oracle.com/javase/9/ jshell/introduction-jshell.htm
  45. 45. We’d Love Your Help
  46. 46. We’d Love Your Help https://youtrack.jetbrains.com/issue/ IDEA-161611
  47. 47. The Pain
  48. 48. Your code might break!
  49. 49. Your code might break! Try it out now to find out sooner, not later
  50. 50. • 214: Remove Deprecated GC Combinations • 231: Remove Launch-Time JRE Version Selection • 240: Remove the JVM TI hprof Agent • 241: Remove the jhat Tool • 260: Encapsulate Most Internal APIs • 289: Deprecate the Applet API • 298: Remove Demos and Samples Going Away
  51. 51. • 158: Unified JVM Logging • 223: New Version-String Scheme • 245: Validate JVM Command-Line Flag Arguments • 248: Make G1 the Default Garbage Collector • 271: Unified GC Logging Possible Unexpected Behaviour
  52. 52. Tools are still evolving
  53. 53. Tools are still evolving …another reason to try it early
  54. 54. Don’t rush in to modularisation
  55. 55. Don’t rush in to modularisation It might not be for you
  56. 56. The Gain
  57. 57. Encourages good design
  58. 58. Encourages new ways of working
  59. 59. Just a bit nicer to write code
  60. 60. …and you’ll be ready for Java 10 Or 18.3…
  61. 61. http://bit.ly/RealJava9

×