Jfokus Training

About Jfokus Training

Get taught directly by the experts and interact with peers in an engaging informal environment. These are intensive, deep dive training sessions designed for advanced IT professionals which incorporate expert-led presentations.

Richard Warburton
Raoul-Gabriel Urma

3 Days: Modern Development with Java 8

Richard Warburton, Monotonic Ltd

Raoul-Gabriel Urma, University of Cambridge


Java 8 isn't your parents Java anymore and was the largest update to Java in its history. Now with Java 9s release some of the best ideas from functional programming are migrating their way into this release. This means easier to read, more flexible code that scales to multicore. Join us to learn about Java 8 and 9 on this hands on 3 day course.
At the end of this course, you will be ready to use the newest tips and tools for Java on your day job and be familiar with the cutting edge programming approaches which allow you to write more flexible and concise code.

When: 14-16 November 2016

Where: Stockholm, Sweden

Language: English

Format: Bring your own laptop

Price: 21 500 SEK

All prices excl. Swedish VAT and incl. lunch


Register here

Day 1

Lambda Expressions

  • Why Java 8?
  • Behaviour parameterisation
  • More flexible code
  • Anonymous classes
  • What is a lambda?
  • Syntax
  • Functional interfaces: where to use lambda expressions?
  • java.util.function
  • Refactoring/putting together exercise
  • Method references: firstclass
  • functions in Java 8
  • Method references recipes
  • Type checking
  • Type inference
  • Using local variables


  • Collection Processing
  • What is a Stream?
  • Stream operations and patterns
  • Filtering
  • Mapping
  • Finding and Matching
  • Reducing
  • minBy/maxBy
  • Stream Optimization
  • the reduce pattern
  • Eager vs Lazy
  • Shortcircuiting and Loop Fusion

Exercise: financial data processing (part 1)


  • Grouping and partitioning
  • Collection Operations
  • Collecting to lists and sets
  • Flexible Collection
  • Arithmetic collectors
  • Max/Min
  • Average/Count/Sum
  • Summary statistics
  • Advanced Queries
  • Beyond grouping and partitioning
  • Downstream collectors

Exercise: financial data processing (part 2)

Mutable Reduction

  • Extending the reduce pattern
  • Reducing collector

Day 2

Easy Data Parallelism

  • What is Data Parallelism?
  • Why is this important?
  • Parallelising your streams
  • Parallel Gotchas
  • Misuse of reduce
  • Dont use Locks
  • Danger of mutability
  • Decomposing performance

Testing & Debugging Lambda Expressions

  • Unit testing lambda expressions
  • Debugging with laziness
  • Stack traces

Practical: Hands on Debugging

Default and static methods on interfaces

  • Motivation for default methods
  • Static methods in interface
  • Useful default methods
  • Patterns for default methods
  • Resolution rules

Enhanced Design with Lambdas

  • Execute around: resource handling
  • Deferred execution: Logging
  • Design patterns
  • Command
  • Strategy
  • Observer
  • Template
  • Factory
  • Processing pipeline

Date & Time in Java 8

  • The problem with existing date and time libraries
  • The core classes: LocalDate/LocalTime
  • Common API Patterns

Optional data types

  • The problem with null
  • How Optional improves upon null
  • How to use Optional in your code
  • Creating Optional objects
  • Default values and actions
  • Transforming Optionals with map
  • Chaining Optionals with flatMap
  • Rejecting values with filter

Day 3

Asynchronous vs Synchronous Programming

  • Servlets

  • Asynchronous Servlets (3.0) & Spring

  • Why use asynchronous communications?

    • Performance
    • Testability
    • Fault Tolerance
  • Timeouts

Approaches to Concurrency

  • The Reactive Manifesto and Functional Reactive Programming

  • Models of Concurrency

    • Event Based
    • Promises
    • The Actor Model
    • Reactive Streams

Promises using Completable Futures

  • Motivation

  • Composition

  • Exception handling

  • Alternative Promise Implementations

The Actor Model with Akka

  • What are Actors?

  • Using Akka

  • Testing actors

  • Alternative Actor Implementations

Reactive Streams with RxJava

  • Introducing Reactive Streams

  • Pull vs. push models

  • Using RxJava

  • Java 9 Flow API

  • Alternative Reactive Stream Implementations



Back to the top of the page