Functional programming is a genuine paradigm shift.  It’s a new way of thinking and abstraction used to model the problem domain.  Benefits include reducing the lines of code, making your code more readable, increased parallel processing abilities, fewer bugs and more.  We’ll compare Object Oriented Programming with Functional Programming and examine where Functional Programming provides better constructs to a given solution.  Most importantly, we’ll cover how to think about Functional Programming while working many hands-on labs that show how it’s implemented in Java.

Course Duration: 5 Days
Prerequisites:

Solid Java programming skills are required. A minimum of 6 months hands on Java coding or a Java Boot Camp is strongly recommended.

Hardware and Software Requirements:
  • Introduction and Fundamentals
    • What is Functional Programming
    • The Benefits of Functional Programming
    • Pushing Abstraction
    • Functions as First-Class Objects
  • Java 8 Interfaces
    • Static Methods
    • Default Methods
    • Functional Interfaces
  • Lambdas
    • Motivation for Lambdas
    • Behavior Parameterization
    • Lambda Expression Overview
    • Lambda Expressions and Functional Interfaces
    • Using Lambda Expressions
  • Types of Functions
    • Pure Functions
    • Higher Order Functions
    • Lazy Evaluator
    • Closures
    • Currying
  • Function Rules
    • No State
    • No Side Effects
    • Immutable Variables
    • Recursion vs Looping
  • Common Functional Interfaces
    • Implementing in Lambdas
    • Functional Interfaces API
    • Function
    • Predicate
    • Unary Operator
    • Binary Operator
    • Supplier
    • Consumer
    • BiPredicate
    • BiConsumer
  • Functional Composition
    • Predicate Composition
    • Function Composition
  • The Stream API
    • Collections and Streams
    • Understanding the Stream API
    • Stream Processing
    • Collectors
  • Power Recursion
    • Recursion vs Looping
    • Recursive Functions
    • Tail Recursion
    • Common Examples
  • Parallel Processing and Concurrency
    • Overview
    • Parallelism vs. Concurrency
    • Java 8 Parallel Processing using Streams
    • Ground Rules / Requirements for Using Parallel Stream Processing
    • Multithreading / Concurrency Issues
    • Race Conditions, Data Synchronization, Locks
    • Performance Issues and Considerations
Course Objectives:
  • Understand the motivation and benefits of functional programming
  • Code using Java 8 interfaces and Lambdas
  • Examine five different function types commonly used in functional programming
  • Learn the rules that valid functions should follow
  • Understand and code common functional interfaces built in to Java
  • Gain hands-on practice and understanding of the Stream API
  • Learn the importance of recursion in functional programming
  • Examine the powerful impact functional programming has on parallel processing and concurrency