Java 8 in Anger Trisha Gee Developer & Technical Advocate, - - PowerPoint PPT Presentation

java 8 in anger
SMART_READER_LITE
LIVE PREVIEW

Java 8 in Anger Trisha Gee Developer & Technical Advocate, - - PowerPoint PPT Presentation

#QConNewYork Java 8 in Anger Trisha Gee Developer & Technical Advocate, JetBrains java.lang and java.util Packages Parallel Array Sorting Standard Encoding and Decoding Base64 Java 8 has many new features Unsigned Arithmetic


slide-1
SLIDE 1

Java 8 in Anger

Trisha Gee Developer & Technical Advocate, JetBrains

#QConNewYork

slide-2
SLIDE 2
  • java.lang and java.util Packages
  • Parallel Array Sorting
  • Standard Encoding and Decoding Base64
  • Unsigned Arithmetic Support
  • JDBC
  • The JDBC-ODBC Bridge has been removed.
  • JDBC 4.2 introduces new features.
  • Java DB
  • JDK 8 includes Java DB 10.10.
  • Networking
  • The class java.net.URLPermission has been added.
  • In the class java.net.HttpURLConnection, if a security manager is installed, calls that request to open a connection require

permission.

  • Concurrency
  • Classes and interfaces have been added to the java.util.concurrent package.
  • Methods have been added to the java.util.concurrent.ConcurrentHashMap class to support aggregate operations based on the

newly added streams facility and lambda expressions.

  • Classes have been added to the java.util.concurrent.atomic package to support scalable updatable variables.
  • Methods have been added to the java.util.concurrent.ForkJoinPool class to support a common pool.
  • The java.util.concurrent.locks.StampedLock class has been added to provide a capability-based lock with three modes for

controlling read/write access.

  • Java XML - JAXP
  • HotSpot
  • Hardware intrinsics were added to use Advanced Encryption Standard (AES). The UseAESand UseAESIntrinsics flags are available to

enable the hardware-based AES intrinsics for Intel hardware. The hardware must be 2010 or newer Westmere hardware. For example, to enable hardware AES, use the following flags:

  • XX:+UseAES -XX:+UseAESIntrinsics

To disable hardware AES use the following flags:

  • XX:-UseAES -XX:-UseAESIntrinsics
  • Removal of PermGen.
  • Default Methods in the Java Programming Language are supported by the byte code instructions for method invocation.
  • Java Mission Control 5.3 Release Notes
  • JDK 8 includes Java Mission Control 5.3.

Java 8 has many new features

slide-3
SLIDE 3

Lambda Expressions

slide-4
SLIDE 4

(…and Streams)

slide-5
SLIDE 5

Real World Application

slide-6
SLIDE 6

Twitter Dashboard

slide-7
SLIDE 7
slide-8
SLIDE 8

Play Along

https://github.com/trishagee/sense

slide-9
SLIDE 9

Leader board: Top Tweeters

slide-10
SLIDE 10

Twitter Leaderboard

slide-11
SLIDE 11

Twitter Leaderboard

slide-12
SLIDE 12

Twitter Leaderboard

slide-13
SLIDE 13

Mood: Happy, Sad or Both?

slide-14
SLIDE 14

Overall Mood

slide-15
SLIDE 15

Overall Mood

slide-16
SLIDE 16

Overall Mood

slide-17
SLIDE 17

Mood: Are We Getting Happier?

slide-18
SLIDE 18

Happiness Over Time

slide-19
SLIDE 19

Happiness Over Time

slide-20
SLIDE 20

Tweet Service: Publishing Real Twitter Data

slide-21
SLIDE 21

Real Tweet Data

slide-22
SLIDE 22

User Service: Extracting the Twitter Handle

slide-23
SLIDE 23

User Service

slide-24
SLIDE 24

Mood Service: Figuring Out the Tweet Mood

slide-25
SLIDE 25

Mood Service

slide-26
SLIDE 26

Now, Fraught With Danger…

slide-27
SLIDE 27

Really Real Data

slide-28
SLIDE 28

What have we learnt?

slide-29
SLIDE 29

What have we learnt?

  • How to use Streams to manipulate data
  • Where Lambdas might simplify your code
  • Basics of building a JavaFX UI
slide-30
SLIDE 30

Resources

http://bit.ly/Java8InAnger

slide-31
SLIDE 31

Questions?

@trisha_gee http://bit.ly/Java8InAnger