Day One – Getting Started with Scala
We begin our day by easing ourselves into the world of Scala. We set up our development environment and learn some basics of Scala language.
Lesson One – Setting up the Development Environment
Before starting with the Scala language itself, we will identify how to set up our development environment. we will learn the basics of Scala, such as what the simple Scala program looks like and what a typical developer flow is. We will identify how to structure the Scala program. We will also cover some aspects of testing your Scala program by using Unit testing.
- Recognize the structure of a Scala project
- Identify the use of Scala’s SBT tool (interactive build tool) for building and running your project
- Identify how to use the IDE
- Implement interactions with a simple chatbot
Lesson Two – Basic Language Features
We will explore the so-called ‘OO’ part of Scala such as Java or C++. The object-oriented part of Scala will cover classes and objects, traits, pattern matching, case class, and so on. Finally, we will implement the object-oriented concepts that we learn to our chatbot application.
- Identify the structure of non-trivial Scala programs
- Identify how to use main object-oriented facilities: objects, classes, and traits
- Recognize the details of function call syntax and parameter-passing modes
Lesson Three – Functions
We will cover functional programming with Scala and how object-oriented and functional approaches complete each other. We will cover generic classes and also cover how to create user-defined pattern matching and why is it useful.
- Identify the basics of functional programming
- Identify the basics of generic types in Scala
- Implement user-defined pattern matching
- Recognize and use functional compositional patterns
Day Two – Scala Collections and Type System
We begin our day by learning various scala collections and then we will cover types.
Lesson One – Scala Collections
We will start by learning how to work with lists. Afterwards, we’ll generalize to sequences and cover some more relevant data structures. Finally, we’ll look at how collections relate to monads and how we can use that knowledge to make some powerful abstractions in our code.
- Identify the Scala collections available in the standard library
- Identify how to abstract sequences by using higher-order Functions
- Implement the important design principles for working with Scala collections
Lesson Two – Scala Type System
In this lesson, we will cover the type system and polymorphism. We will also cover the different types of variance, which provides a way to constrain parameterized types. Finally, we will cover some advanced types such as abstract type members, option, and so on.
- Identify the Scala type hierarchy
- Use the features the Scala type system provides
- Identify abstractions that the Scala type system enables
Lesson Three – Implicits
We will cover implicit parameters and implicit conversions. We’ll be learning about how they work, how to use them, and what kind of benefits and perils they provide.
- Describe “implicits” and how the Scala compiler handles them
- Explain the design patterns that “implicits” enable
- Analyze the common issues that may arise by overusing “implicits”
Day Three – Building Code using Functional Programming
We begin our day by focusing on the functional programming aspects of Scala. We will then cover Cats and Doobie, which are the two popular functional programming libraries.
Lesson One – Functional Idioms
We’ll cover the core concepts of functional programming like Pure functions, immutability, and higher-order functions. We’ll introduce some of the design patterns that are prevalent in large functional programs. Finally, we’ll cover two popular functional programming libraries called Cats and Doobie, and use them to write some interesting programs.
- Identify the core concepts of functional programming
- Recognize and implement the popular functional programming design patterns
- Implement Cats and Doobie in your own Scala projects
Lesson Two – Domain-Specific Languages
We will cover how Scala makes it possible to write powerful DSLs by providing a few interesting language features. We’ll have a brief look at what DSLs are in general terms. We’ll also cover a DSL that you’ll very likely be using if you’re going to work with Scala professionally. Finally, we will implement our own DSL.
- Identify the use of Domain-Specific Languages (DSLs)
- Use the DSL that ScalaTest, a popular testing library for Scala, provides
- Design your own DSLs in Scala