Functional Programming for Java Developers

The Functional Programming for Java Developers training course is designed to provide the Java Developer with the knowledge and skills to incorporate functional programming into their daily coding lives. The course will cover the fundamentals of functional programming in contrast to imperative programming and how functional style can reduce bugs, and increase the maintainability of code. Students will learn about immutability, pure functions, functions as first-class values, higher order functions, and simple monads. The course also introduces functional concurrency, with Java’s Promise mechanism, provided by the CompletableFuture API. The course also teaches how to mix programming styles during migration, and how to handle exceptions in a functional system. Hands-on exercises will be incorporated throughout to enhance learning. Students will also investigate the overlap between object-oriented programming concepts such as the Liskov Substitution Principle and design patterns with functional concepts.

Course Summary

Purpose: 
Prepare Java developers to utilize functional programming when creating code.
Audience: 
Java developers and developer teams needing to learn functional programming.
Skill Level: 
Learning Style: 

Workshops are instructor-led lab-intensives focused on the practical application of technologies through the facilitation of a project-related lab. Workshops are just the opposite of Seminars. They deliver the highest level of knowledge transfer of any format. Think wide (breadth) and deep (depth).

Workshop help
Duration: 
3 Days
Productivity Objectives: 
  • Describe Functional Programming and how it differs from imperative programming
  • Explain how side-effect-free functions reduce errors and are easier to test
  • Work with immutable data, and understand how immutable data structures can be used in a memory-efficient way
  • Create and use higher-order functions, and use syntax that simplifies these constructs
  • Make effective use of generics, along with co- and contra-variance to create more reusable functional code
  • Create, use, and understand Monads, Functors, Monads and common operations these provide
  • Use common monadic libraries for parallel and asynchronous data processing

What You'll Learn

In the Functional Programming for Java Developers training course you’ll learn:

  • Introducing the pure function concept
    • What are “side effects”?
    • What are “observable side effects”?
    • Why we care: composability of program elements, and maintenance
    • Avoiding mocking: Testing a pure function
    • Refactoring our thinking and designs for pure functions
  • Immutability in the real world
    • Unresolved and resolved values
    • Variable names and “meaning something else”
    • Expressions versus variables
    • Warning: Initialization is mutation
    • Overview of recursion
    • Overview of immutable data structures
  • Solving a simple design problem using imperative and functional styles
    • Printing items from a list
    • Passing behavior as function arguments
    • Introduction to higher order functions
  • Java’s Lambda syntax
    • Lambdas
    • The single abstract method and functional interfaces
    • Method reference syntax
  • Behavior factories
    • Methods returning behaviors
    • Returning behaviors that depend on the factory arguments
    • Closures in Java
    • Function decorators
    • Investigating some of Java’s standard function decorators
  • The importance of generics in functional programming
    • Generics as the polymorphism of functional style
    • Using generics to describe higher order functions
    • Co- and contra- variance in higher order function arguments
  • Introduction to the monad concept
    • A smart container
    • Selecting items
    • Changing items, the Functor
    • The flatMap method, the Monad
  • Introduction to producing a final result
    • The reduce operation
  • More advanced and parallel production of a result
    • The Monoid
    • Reductions to a different type
    • Fold operations
  • Overview of monad-like libraries and frameworks
    • Java Streams
    • Java’s Promise API, the CompletableFuture
    • Spark Streaming
  • Handling errors in functional programming
    • Using reliable, purpose-specific, abstract data types can avoid problems
    • Total vs partial functions
    • The trouble with exceptions
    • Using Optional and Either monad-like features
    • Wrapping code that throws exceptions

Get Custom Training Quote

We'll work with you to design a custom Functional Programming for Java Developers training program that meets your specific needs. A 100% guaranteed plan that works for you, your team, and your budget.

Learn More

Chat with one of our Program Managers from our Boulder, Colorado office to discuss various training options.

DevelopIntelligence has been in the technical/software development learning and training industry for nearly 20 years. We’ve provided learning solutions to more than 48,000 engineers, across 220 organizations worldwide.

About Develop Intelligence
Di Clients
Need help finding the right learning solution?   Call us: 877-629-5631