Overview

This 2-day course is designed to give experienced developers proficient in Java, C++, C# or Ruby the know-how to confidently start programming in Scala. The course ensures you will have a solid understanding of the fundamentals of the language, the tooling and the development process as well as a good appreciation of the more advanced features. If you already have Scala programming experience, then this course could be a useful refresher, yet no previous knowledge of Scala is assumed.

Objectives

  • Be a competent user of Scala for application development
  • Know and be able to apply the functional programming style in Scala
  • Know how to use the fundamental Scala tools
  • Be confident to start using Scala in production applications

Outline

Intro - What is Scala

  • Where did it come from?

Object Oriented Basics

  • The core syntax of the language
  • Creating classes with constructor arguments, fields and methods
  • How case classes work
  • Focus on immutability and concise code

Testing in Scala

  • Introduction to Behavior Driven Development
  • Syntax of ScalaTest

Collections and Functional Programming

  • Discussion of the core collection classes and how to use them
  • Focus on immutability
  • Persistent data structures and structural sharing
  • Sequences vs sets
  • How are Maps organized and used
  • What are functions and how do higher-order functions work?

For Expressions

  • Composing multiple higher-order functions

Traits and Inheritance

  • How to leverage traits and the type system in Scala
  • Focus on composition over rigid inheritance structures
  • Discussion of linearization
  • How Scala resolves implementations while avoiding multiple inheritance that the JVM will not allow

Pattern Matching

  • What is it?
  • How can it be used to write powerful and expressive code?
  • Discussion of how to catch exceptions
  • How to deconstruct tuples on the fly

Options

  • Introduction to what the Option type is
  • How it can be used
  • Try: How to handle application errors in Scala

Requirements

  • Experience programming in a language such as Java, C, C++, Ruby or JavaScript.