What is This Course About?

This lesson provides an overview of the intended audience of the course, its contents, and learning outcomes.

Let’s start by looking at the intended audience for this course.

Intended audience

This course is intended for the intermediate Scala programmer interested in functional programming. It works mainly on the back-end web service. Ideally, you need to have experience with libraries like Akka HTTP and Slick, which are focused heavy in that area.

Scala is one of the most commonly-used general-purpose programming language and supports both object-oriented and functional programming. In this course, you will explore the functional aspects of Scala.

Course contents

You will start by looking at a small use case. We will learn the difference between pure and impure in this course by looking into referential transparency and how functional programming relies on it. You will then gradually implement the use case in both pure and impure ways.

The formal outline of the API service is provided in the next lesson.

We will simultaneously build, test, and document the implementations and point out the tools required along the way. We will look at the following concepts in our course:

1. Impure service

For impure services, we will use the following libraries:

However, we can do better than the aforementioned libraries, even though they are battle-tested and proven to work well.

The question now is: “How can we do better?” The answer is pure service, which is discussed at length in the coming chapters.

2 - Pure service

We will use the following libraries for the pure case:

3 - Benchmarks

Once we have built and tested the services, we will compare the APIs’ performance for both pure and impure implementations.

4 - Documentation

Next, we will dive into how our pure and impure services can be documented. We will make use of Swagger and tapir to document our pure service.

Learning outcomes

The purpose of this course is to introduce you to both pure and impure techniques of implementing services. By the end of this course, you will have substantial understanding of how these techniques work, what their pros and cons are, and how pure implementation can be more robust in terms of the following:

  • Understandability
  • Testability
  • Performance
  • Type Safety etc.