Programming in Scala 1000-2M25SCA
After completing the course, students should be able to use Scala to create simple but practical
applications, such as a web application that accepts user data, saves it, displays it, and allows
for its modification and deletion (other possible examples: a desktop application, an Android
application, a video game). They should know Scala syntax, basic concepts of functional
programming and their implementation in Scala, as well as be able to plan and configure a
Scala project and develop it as a programmer working in a team.
The following topics will be discussed during the classes:
1. Scala syntax: val vs var, immutable vs mutable collections, case class, case object,
companion object, sealed trait, enum, apply and unapply, pattern matching.
2. Main concepts of functional programming: functions as data, immutability, laziness (lazy
evaluation), type system.
3. Main methods for operations on data collections: filter, map, collect, find, collectFirst,
flatMap, fold.
4. Version control system using git as an example. Commands: init, clone, checkout,
branch, commit, push. Resolving conflicts using merge and rebase. Discussion of open-
source licenses, how to write a README, what .gitignore is for, how to do code review,
what GitHub Actions are.
5. Building a web application in Play Framework.
6. Futures, async/await, event streams, actor model, Akka/Pekko.
7. Recursion: tail recursion (tailrec), trampolines. Advanced pattern matching: reminder of
enum and unapply; how to build and manipulate a binary tree.
8. Introduction to the debugger and other IntelliJ IDEA features helpful for refactoring, code
completion, etc.
9. Monads: Theory, error handling using Option/Either/Try, IO monad in Cats Effect.
10. Roadmap for further learning: Discussion of main websites, YouTube channels, etc.
Overview of the main areas of software development and which Scala frameworks and
libraries support them: JSON parsing, ORM, HTTP request handling, build tools, GUI
frameworks, web frameworks, testing.
Type of course
Prerequisites (description)
Assessment criteria
Form: Programming project.
Students will be tasked with forming 3-5 person programming teams, then selecting a project,
setting up a repository on the GitHub platform, and implementing a multi-level application (e.g.,
a web application that accepts user data, saves it, displays it, and allows for its modification and
deletion, a desktop application with a similar structure, a mobile application for the Android
system, a simple computer game, etc.).
The assessment will not only consider the final result but also teamwork (task division,
communication among team members), code quality, and the presence and quality of tests. Mid-
semester and during the last classes, students will have the opportunity to present their project.
Bibliography
1. “Functional Programming in Scala, Second Edition”, 2023, Michael Pilquist, Rúnar
Bjarnason, and Paul Chiusano (https://www.manning.com/books/functional-programming-
in-scala-second-edition)
2. Interactive course “Functional Programming in Scala”, JetBrains
(https://plugins.jetbrains.com/plugin/23833-functional-programming-in-scala)
Additional information
Additional information (registration calendar, class conductors, localization and schedules of classes), might be available in the USOSweb system: