Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Real World Java 9 - JetBrains Webinar

35,584 views

Published on

The feature we always hear about whenever Java 9 is in the news is Jigsaw, modularity. But this doesn't scratch the same developer itch that Java 8's lambdas and streams did, and we're left with a vague sensation that the next version might not be that interesting.

Java 9 actually has a lot of great additions and changes to make development a bit nicer. These features can't be lumped under an umbrella term like Java 8's lambdas and streams, the changes are scattered throughout the APIs and language features that we regularly use.

In this presentation Trisha will show, via live coding:
- What the Java Platform Module System is and how to make your code modular
- How we can use the new Flow API to utilise Reactive Programming
- The improvements to the Streams API that make it easier to control infinite streams
- How to the Collections convenience methods simplify code

Along the way we'll bump into other Java 9 features, including some of the additions to interfaces and changes to deprecation.

Published in: Software
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Real World Java 9 - JetBrains Webinar

  1. 1. — Trisha Gee (@trisha_gee) Developer & Technical Advocate, JetBrains Real World Java 9
  2. 2. Any questions? Use the Questions pane in the GoToWebinar window. We’ll try to answer as we go along.
  3. 3. Real World Java 9 • Jigsaw in Action • The Reactive API in Java 9 • Everything Else
  4. 4. Why Java 9?
  5. 5. 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
  6. 6. Jigsaw
  7. 7. REPL
  8. 8. And… other things?
  9. 9. 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
  10. 10. The Case Study
  11. 11. Twitter Dashboard
  12. 12. http://bit.ly/Java8InAnger
  13. 13. Compiling with Java 9
  14. 14. Jigsaw
  15. 15. • 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
  16. 16. Java Platform Module System (JPMS)
  17. 17. module-info.java
  18. 18. Pain • Some structural reorganisation may be needed • IDE support is not what we’re used to • RTFM. No, really do.
  19. 19. • Cleaner design • Reliable configuration • Smaller deployables Gain
  20. 20. Reactive API
  21. 21. Reactive Streams API
  22. 22. • Akka Streams • MongoDB Reactive Java Driver • Ratpack • Reactive Rabbit • Reactor • RxJava • Vert.x Implementations
  23. 23. Java 9 Flow API
  24. 24. Other Java 9 Features
  25. 25. 269: Convenience Factory Methods for Collections
  26. 26. 213: Private Methods on Interfaces
  27. 27. New Methods on the Streams API
  28. 28. New Methods on Optional
  29. 29. 259: Stack-Walking API
  30. 30. 102: Process API Updates
  31. 31. 238: Multi-Release JAR Files
  32. 32. 277: Updated Deprecation
  33. 33. 224: HTML5 Javadoc
  34. 34. 225: Javadoc search
  35. 35. JShell (REPL)
  36. 36. https://docs.oracle.com/javase/9/jshell/int roduction-jshell.htm
  37. 37. We’d Love Your Help https://youtrack.jetbrains.com/issue/IDEA- 161611
  38. 38. The Pain
  39. 39. Your code might break! Try it out now to find out sooner, not later
  40. 40. • 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
  41. 41. • 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
  42. 42. Tools are still evolving …another reason to try it early
  43. 43. Don’t rush in to modularisation It might not be for you
  44. 44. The Gain
  45. 45. Encourages good design
  46. 46. Encourages new ways of working
  47. 47. Just a bit nicer to write code
  48. 48. …and you’ll be ready for Java 10 Or 18.3…
  49. 49. http://bit.ly/RealJava9

×