Fast Track to Java 9

Dates: Monday 30th April – Friday 4th May
Number of Days: 5 days
Venue: Maryborough Hotel, Douglas, Cork
Training Provider: Instil
Member fee: €900
Non-member fee: €1500
To register interest or to book a place on this course please email Annette Coburn on skillnet@itcork.ie
Introduction
This is an intensive course designed to introduce software developers to the Java ecosystem in general and the Java 9 language in particular. All four programming styles supported by Java are covered in depth, but with a particular emphasis on the functional style and its growing importance to both parallel and cloud computing.
The course is aimed primarily at three groups:
- Experienced coders who will be moving into Java from other languages
- Developers who need an update to the new features in Java 8 and 9
- Graduates looking to consolidate knowledge gained through academia
In addition to the core language topics, the course also covers a variety of the skills required on modern Java / JEE projects, these being:
- Reactive programming via frameworks like Project Reactor
- Test Driven Development via tools like JUnit and Mockito
- Behaviour Driven Development using Cucumber
- Writing scripts in Groovy and using Groovy DSL’s
Course Modules
Introducing the Java Landscape
- Origins and goals of the Java language
- Bytecode and the Java Virtual Machine
- Distinguishing between JME and Android
- Where Microservices and the JEE diverge
- Popular languages on the Java platform
Essential JVM Concepts
- Types, packages and archives (JAR/WAR/EAR)
- References and tuning Garbage Collection
- Hierarchical class loading and Agents
- The CLASSPATH environment variable
- The new Module System in Java 9
Basic Java Programming
- Primitive types and literal values
- Java syntax for binary and numeric literals
- The difference between reference and value types
- Converting between strings and numerical types
- Parsing console input with the Scanner class
- Pretty-printing with the Formatter class
- Performing iteration and selection in Java
- Support for strings in switch statements
- Equality with primitive and reference types
- Creating and manipulating arrays
- The costs of string concatenation
Object Oriented Development – Part 1
- Creating basic Java classes
- Choosing accessibility levels
- Inheriting from a base class
- Overloading and overriding methods
- Comparisons using the instanceof operator
- Comparisons using lang.Class objects
- Creating abstract and final classes
Object Oriented Development – Part 2
- Writing appropriate class constructors
- Private constructors and singletons
- Static and instance initialization blocks
- Top down class and object initialization
- Declaring and implementing interfaces
- Using inner and anonymous classes
- Implementing equals and hashCode
- Cloning and copy constructors
Enumerations
- Why Java historically lacked enum support
- The Typesafe Enumeration Design Pattern
- How Java 5 baked the pattern into the language
- Extending enums with new members
- Helper methods added to enum types
- Collections which support enums
Annotations and Meta-Programming
- Adding metadata to Java code
- The advantages of annotations
- Annotations verses configuration files
- Declaring Java 5 annotation types
- Understanding meta-annotations
- Adding methods to annotation types
- Defining default values for methods
- Discovering annotations with reflection
- Writing annotation processors in Java 6
- Enhancements to annotations in Java 8
Functional Programming with Method References and Lambdas
- Overview of the key concepts of Functional Programming
- The concept of ‘method references’ in the language and JVM
- Creating references to methods, static methods and constructors
- Understanding when and why to use lambda expressions
- The various syntax options when declaring lambdas
- Making use of the @FunctionalInterface annotation
- Lexical scoping and ‘effectively final’ variables
- Support for type inference of parameters in lambdas
- Best practices when declaring and using lambdas
Introducing the Collections API
- Introducing lists, sets and maps
- Using iterators and enumerations
- Choosing the most efficient collections
- Specialized collections in other packages
- Collections designed for concurrent access
- Open source alternatives to regular collections
Functional Programming With Collections and Streams
- Introducing the util.stream.Stream interface
- Different ways of creating streams of objects
- How Optional helps eliminate null pointer exceptions
- Using parallel and sequential to switch processing model
- Performing filtering and mapping on a streams content
- Using reduce to compute a final value from a stream
- Understanding the purpose and value of flatMap
- The collect method and its many different applications
- Enhancements to the streams library in Java 9
- Support for Reactive Programming in Java 9
- Taking Rx further via Project Reactor
Exception Handling in Java
- Introducing errors, runtime exceptions and checked exceptions
- Special consideration for exceptions in constructors and finalizers
- Implementing an effective exception handling strategy
- Using finally blocks properly to perform ‘clean-up’ tasks
- Java 7 improvements to the try…catch syntax
- The try-with-resources syntax introduced in Java 7
Generics in Java
- Introducing Type Parameters and generic code
- Understanding reified vs. non-reified Generics
- Generics is a compile time feature in Java
- Declaring generic classes and methods
- Type inference when creating generic types
- Creating your own generic collection classes
- Support for Generics in the Reflection API
- Using the wildcard type in utility methods
- Defining constraints with bounded wildcards
- Making sense of upper and lower bounds
- Common confusions with wildcards
- How compilers perform Type Erasure
The Date and Time API
- How JSR310 evolved from the Joda Time library
- Working with instants, clocks and time zones
- Performing calculations with dates and times
- Using adjusters to make common changes to dates
- Parsing and formatting dates and times
- Combining the API with legacy code
TDD in Java with JUnit and Mockito
- Defining your intent through tests
- Writing just enough code to pass
- Adding tests and refining the code
- Testing up to the point of boredom
- Triangulating on hard problems
- Moving up and down the gears
- You aren’t going to need it (YAGNI)
- Why encapsulated dependencies are bad
- Using DI to isolate dependencies
- Creating and injecting Test Doubles
- Situations where TDD will not work
Behaviour Driven Development in Java with Cucumber
- How BDD evolved from Test Driven Development
- Writing scenarios using the Gherkin syntax
- Moving shared steps into a background section
- Embedding data tables within scenarios
- Setting up JUnit to run and configure Cucumber
- Creating a class to hold step definitions
- Writing step definitions via annotations in Java 6
- Writing step definitions via lambdas in Java 8
- Matching to the content of steps via regex
- Using sub-matches to capture input values
- How cucumber converts and tokenizes inputs
- Reading and extracting values from data tables
Java Concurrency Fundamentals
- The threading model in Java prior to version 5
- Creating threads using Executor objects
- Storing return values in Future objects
- Designing parallel algorithms using the ‘fork-join’ framework
- Lock objects as an alternative to the synchronized keyword
- Making full use of the ‘thread-friendly’ collection classes
- Scalable thread-safe counters in util.concurrent
- Parallel array sorting using methods in util.Arrays
Scripting on the JVM with Groovy
- Support for both static and dynamic typing
- Options for quoting and interpolation in strings
- Special operators not found in the Java language
- Enhancements to the switch statement and pattern matching
- Flexible method declarations and inferred return types
- Built in support for collections and helpful idioms
- Creating objects from tables and specifying fields by name
- Using traits to extend classes and also objects at runtime
- How properties are generated and accessing fields directly
- Understanding and making use of multi-methods in Groovy
- Supporting indexing and operator overloading on your types
- Declaring and using closures in Groovy scripts
- What this, owner and delegate mean in closures
- Specifying closures as inputs and outputs from methods
- Built in support for currying and partial invocation
- When and how to convert methods into closures
- Wrapping methods in closures to perform memoization
To register interest or to book a place on this course please email Annette Coburn on skillnet@itcork.ie