Online Training

Refactoring Legacy Code with Java 8

Execute parallel streams and implement design patterns using lambdas

July 19, 2016

7:00AM – 4:00PM PDT

Register now

Sign up before this course sells out!

Join experts Richard Warburton and Raoul-Gabriel Urma to learn how to make effective use of advanced features in Java 8, beginning with parallel streams, how they work, and recommended guidelines for using them. Through hands-on guided exercises you’ll go deep into Java’s functional programming features and develop a working knowledge of all major API enhancements to Java 8.

What you’ll learn—and how you can apply it

By the end of this live, hands-on, online course, you’ll know:

  • Best practices for developing using Java functional programming features
  • The ins-and-outs of parallel streams
  • All major API enhancements in Java 8 including Date/Time, Optional and CompletableFuture
  • How to apply testing and debugging practices for streams and lambdas
  • How to Refactor old Java code to use modern Java 8 features for increased flexibility and code concision

This course is for you because…

  • You are an experienced Java developer or software architect who is interested in taking your knowledge of Java 8 topics to the next level
  • You are a team member or leader who see the value in learning Java 8 as a team in order to increase overall productivity and work together with a shared understanding

Prerequisites:

  • Familiarity with Java 8 programming fundamentals
  • Able to write lambda expressions and process collections in a functional and declarative manner
  • Know how to run unit tests using JUnit

About your instructors

Richard Warburton

Richard Warburton is an empirical technologist and solver of deep-dive technical problems. Recently he has worked on data analytics for high performance computing and authored Java 8 Lambdas for O’Reilly. He is a leader in the London Java Community and organized the Adopt-a-JSR programs for Lambdas and Date and Time in Java 8.

Richard also frequently speaks at conferences, and has presented at JavaOne, DevoxxUK, Geecon, Jfokus and JAX London. He obtained a PhD in Computer Science from The University of Warwick, where his research focused on compiler theory.

Raoul-Gabriel Urma

Raoul-Gabriel Urma obtained a PhD in Computer Science from the University of Cambridge. He is co-author of the bestselling book Java 8 in Action: Lambdas, Streams, and functional-style programming published by Manning.

In addition, Raoul has written over 10 peer-reviewed articles and given over 50 technical talks at international conferences. He has worked for large companies such as Google, eBay, Oracle, and Goldman Sachs, as well as for several startup projects.

Schedule

  • Collectors (30 minutes)
    • Advanced queries
    • How to write your own collector
    • Participant exercise: Composing collectors to build advanced data processing pipelines
  • Easy data parallelism (60 minutes)
    • What is data parallelism?
    • Why is this important?
    • Parallelizing your streams
    • Parallel gotchas
    • Decomposition performance
    • Participants learn about how they can make their streams API code be run in parallel
  • Break (15 minutes)
  • Testing and debugging lambdas (20 minutes)
    • Unit testing lambda expressions
    • Debugging with laziness
    • Stack traces
    • Participants learn about how lambda expressions can be debugged with live coded examples
  • Default and static methods on interfaces (45 minutes)
    • Motivation for default methods
    • Static methods in interface
    • Useful default methods
    • Patterns for default methods
    • Resolution rules
    • Participant exercise: Implementing and using default methods, resolving resolution ambiguity
  • Enhanced design with lambdas 1 (45 minutes)
    • Execute around: Resource handling
    • Deferred execution: Logging
    • Participant exercise: Using the execute around pattern to extract out file handling logic
  • Lunch (60 minutes)
  • Enhanced design with lambdas 2 (45 minutes)
    • Design patterns
    • Using lambdas and exceptions in APIs
    • Participant exercise: Implementing the observer and strategy pattern using lambda expressions
  • Break (15 minutes)
  • Date and time in Java 8 (60 minutes)
    • The problem with existing date and time libraries
    • The core classes: LocalDate/LocalTime
    • Common API patterns
    • Timezones
    • Participant exercise: Building a birthday diary using date & time and streams.
  • Break (15 minutes)
  • The Optional data type (45 minutes)
    • The problem with null
    • How Optional improves upon null
    • How to use Optional in your code
    • Alternative data modeling approaches
    • Participant exercise: Using the Optional data type to safely handle configuration validation
  • CompletableFuture (20 minutes)
    • Future and executor service in a nutshell
    • Common patterns with CompletableFuture
    • Participants learn about they can use CompletableFuture to build an ecommerce pricing system

Register now

Individual ticket: $299

Participate in this workshop from the convenience of your home, your office… whatever environment you find most comfortable and conducive to an intensive educational experience.

Group ticket

Working as a team? Learn as a team.

Taking this course as a team ensures that everyone is on the same page and understands both the immediate and long-term and immediate goals of your project. Exploring new ideas and collaborating on exercises together is a great team-building experience; everyone on your team will have the opportunity to ask questions, discuss use cases, and learn from other participants.

For group tickets and enterprise licensing, please contact onlinetraining@oreilly.com.

Once you have registered, further details about joining the workshop will be available in your members.oreilly.com account. After the event concludes, access to the recording of the event will be added to your account.