Best Scala Books for Beginners and Experienced Developers

by  ramya
Updated: Jan 12, 2021
18 min read

Scala is a relatively new programming language and combines both functional as well as object-oriented programming paradigms. One key advantage of Scala is that it offers both JVM and Javascript runtimes and lets you use the existing libraries of both Java and JS.

On the usage side, Scala is fast becoming the language of choice for many developers and has all the potential to replace some of the existing languages.

In this article, we have provided brief reviews of the best Scala books you can get hold of in the market. We have also added some guiding tips to help you select a good Scala book for your skill level.

On the complexity front, learning Scala is not difficult if you have a programming background but it it is still difficult to find the right resources to learn Scala.

This is where books come to the rescue. The books in this article are categorized as Scala books for beginners, books for developers coming from other programming languages, and books to master advanced level Scala concepts including functional programming.

Best Scala Books for Beginners

A beginner’s book needs to be simple and well-structured. This means each topic should include enough examples. One of the books covered in this section for beginners is Programming in Scala which is co-authored by Scala designer itself and is very comprehensive.

Another good book that goes very methodical for beginners is Learning Scala – Practical functional programming for the JVM.

Adding further to this, there are few other books like Introduction to the Art of Programming using Scala that is designed keeping in mind computer science students and focuses on CS1 and CS2 curriculum too.

Programming in Scala 4th Edition

Martin Odersky, Lex Spoon, Bill Venners (Artima Inc, January 2020)

Programming in Scala starts off with basic Scala and moves on to explain more complex Scala features. Through the book, you will learn basic programming concepts of object-oriented as well as functional programming with Scala. The book is recently updated to cover the latest version of the Scala specifications and covers new features in detail including collections overhauling done in Scala.

Organization of Chapters below

The first chapter gives a background to Scala and explains why Scala is scalable. Following which you will learn more about the Scala interpreter and basics such as variables, functions, loops, etc.

Further to this, you will learn parametrized arrays, lists, tuples, sets, maps, and functional-style programming. Moving forward, you will read more about classes, objects, operations, basic types, functional objects, manipulating strings, method overloading. Net net, you get everything here to get a good handle on control structure of the program.

Going on, you will see more about functions, closures, effective abstraction in Scala, inheritance and everything related to object oriented programming. Then a complete chapter explains Traits. Also covered are assertions and unit testing in Scala. Next, you will learn pattern matching, kinds of patterns, option types, sealed classes and pattern overlaps.

The next few chapters are focused on working with data and how Scala can be used in big data. This covers collections, lists, stateful objects, and a lot more. Post this the book covers type parametrization, abstract members, implicit conversions, extractors, and annotations.

Moving on further, advanced topics such as working with XML, modular programming in Scala and object equality in Scala is covered.

All in all, it can be easily ranked as the best Scala book for beginners.

View On Amazon

Learning Scala

Practical Functional Programming for the JVM 1st Edition

Jason Swartz (O’Reilly Media, January 2015)

Learning Scala is another comprehensive book and suitable for beginners. The book covers practical scala along with detailed theory and many sample examples. Apart from absolute beginners, this book is also a good option for developers coming from Python with an intention to work on big data applications.

Organization of Chapters

The book starts with an introduction to core Scala and covers installing Scala and Scala REPL. Following this, you will read about literals, variables, and data types. With this, you will also learn expressions, conditionals, loops, functions, procedures, nested functions, recursive functions, etc.

Post this, the book covers higher-order functions, placeholder syntax, partial functions, functions literals. Other topics such as collections, arrays, streams, monadic collections and future collections.

With all the basics of programming covered, you get to know more about object-oriented programming with classes, anonymous classes, overloaded methods, privacy controls, etc. in the next few chapters.

The last section covers objects, Traits, advanced typing. Overall, the book covers all the fundamentals of Scala. Each chapter has a practice exercise at the end. The book is available in Kindle and Paperback format.

View On Amazon

Scala Cookbook

Recipes for Object-Oriented and Functional Programming

Alvin Alexander (O’Reilly Media, August 2013)

Scala Cookbook is not just suitable for experienced programmers but also beginners. The book has a massive collection of coding samples. To put forth, the book has almost 700 code examples and 250 ready to use code recipes that solve common programming problems.

Organization of Chapters

The book is simple and gradually speaks about every new feature. First, it is all about an introduction to strings, numbers, and other basic data types. Next up you have chapters covering control structures, classes, properties, and methods.

The book also covers objects, packaging, imports, and overall project organization in Scala.

Post this, you get into territories of functional programming, learn about traits, higher-order functions, and more.

To make it easy for beginners, there are dedicated chapters for – lists, arrays, file processing, actors, and concurrency. The last few sections cover advanced Scala concepts such as command-line tasks, web services.

The book also covers database persistence and how you can use Scala along with existing Java libraries. The final chapters cover generic types, duck typing, mutable collection invariant, and related topics.

Being extremely detailed, the book gives a thorough understanding of Scala. The book is available in Kindle and Paperback format.

View On Amazon

Introduction to the Art of Programming Using Scala

Mark C. Lewis (Chapman & Hall/CRC Textbooks in Computing, November 2012)

“Introduction to the Art of Programming Using Scala,” is another book that is well suited for absolute beginners. The book goes a step forward and covers basic programming concepts from CS1 and CS2 curriculum as well. Moreover, the book covers every minute detail including environment setup, hardware requirements, etc.

Organization of Chapters

The first chapter elaborates more on the history of Scala, hardware/software requirements, programming paradigms. The next chapter speaks about tools used for Scala. Following this, you will learn more about Scala basics such as types, objects, methods.

Moving on further the book covers conditionals, functions, recursion for iteration, arrays, lists. Other topics covered here are – loops, multidimensional arrays, file processing, classes, GUIs, and working with Graphics in Scala.

The book contains a good collection of frequently used algorithms written in Scala. Further, the book speaks about XML parsing, recursion, more about OOP concepts, data structures. Through the book, you will learn the usage of Eclipse IDE, CVS, Scaladoc comments. With this, the book covers a complete project life cycle, followed by abstraction, and collections.

The final section of the book includes advanced topics. Topics covered here are – concurrency, concurrency libraries, Scala Actors, stream IO, networking in Scala. In detail, you will read about stacks, queues, linked lists, priority queues, refactoring, recursion, regular expressions.

To add to the book also covers in detail data structures. Few of these covered are spatial trees, binary heaps. Final chapters cover direct binary access files and in detail about Actors and augmenting trees.

In summary, the book is extremely detailed and gives deeper insights into Scala from an absolute beginner’s perspective.

The book is available as eTextbook in pdf format, hard cover and paperback format.

View On Amazon

Scala in Action: Covers Scala 2.10 1st Edition

Nilanjan Raychaudhuri, Chad Fowler (Manning Publications, April 2013)

The book Scala in Action goes a little beyond absolute beginners and requires you to have some experience in programming and application development in general.

The book is very systematically divided into logical sections and moves from basics to advanced level concepts. Various topics covered in the book include –

  • Scala basic tutorial
  • Working with Java and Scala open-source libraries
  • Test-Driven Development
  • Debugging applications
  • And the recent updates to Scala 2.xx specifications

Organization of Chapters

The first part of the book covers Scala basics and starts off by giving a background on why to choose Scala. With this, you will learn Scala basics, OOP in Scala, functional data structure, and functional programming.

The next section of the book covers advanced concepts and how Scala and programming are used for enterprise-level application development. The topics here are – Building web applications in a functional style, connecting to databases, and working with extensible components.

Further, the book covers details of concurrent programming in Scala using the Akka framework and also details on how distribution applications work. Towards the end, you get more details on interoperability between Scala and Java.

Based on your experience, you can skip certain topics in the book. However, the book gives a strong grasp of Scala programming. The book is available only in Paperback format.

View On Amazon

Best Scala Books for Big Data and Developers Coming from Other Languages

Many experienced developers want to focus on specific features that Scala brings to the table. Also, given that developers coming from Python or Java are already familiar with OOPs and need books tailored to cover distinct Scala features.

This section covers books for developers coming from other programming languages, the section also covers books on big data with Scala and draws parallels between Scala and other languages to achieve a programming task.

Scala for Java Developers

Thomas Alexandre (Packt Publication, April 2014)

Scala for Java Developers covers all that a Java developer might want to know about Scala. The book covers interoperability between Scala and Java. This is a good guide if you want to reuse Java code to build Scala applications and also explains how Java code can be migrated to Scala.

The book covers real-world examples. Moreover, a lot of enterprise-level complexities are discussed throughout the book. To begin with, the book introduces Scala. Along with this, you will read the advantages of using Scala for Java projects, Scala using REPL. A quick overview is provided for commonly used Scala features.

Next, you will see more about code integration. This includes creating REST API, using a database, setting the Maven project, adding unit testing in Scala. The book nicely throws light on the differences between Scala and Java.

Over the next few sections, more details are provided about the Scala ecosystem. Covers topics such as SBT, using IntelliJ, working with HTTP, activator templates, REPL as a scripting language. Further, the book explores, testing tools for Scala, Play framework, ORM in Scala.

Here you will also read through building web services and working with web applications. Finally, you will read more about reactive web applications, Akka-angular-WebSocket template, Actors, and exploring big data. Overall, the book makes application scaling from Java to Scala easier. The book is available in Kindle and Paperback format.

View On Amazon

Scala for Data Science

Pascal Bugnion (Packt Publication, January 2016)

Scala for Data Science is a convergence of Scala and Data Science and is meant for experienced developers. Using this book one can leverage the potential of Scala to build data science applications. The book is intended for developers who want to build scalable data science solutions starting from data ingestion to data visualization.

The book also focuses on horizontal scaling, building functional and type-safe routines to work with both NoSQL as well as relational databases. You will find ample real time code examples like –

  • Reading data from web APIs like Twitter API and Github API
  • Examples where you can use Scala to interact with MongoDB
  • Creating data visualizations with JavaScript libraries like D3
  • Loading data from HDFS, Hive and working with Apache Spark

More details on the topics Covered

The first chapter explains more about data science and why you should choose Scala for scalable big data projects. It also talks about why and when not to use Scala.

Through the book, you will learn plotting with Breeze-viz, parallel collections, futures and know about breeze alternatives. This is accompanied by a good set of examples.

Following this, the book covers working with Scala and SQL. Some of the topics covered here are – functional wrappers for JDBC, use of loan pattern for safer JDBC connection, using the stream for the result set.

The book also covers Slick, Slick v/s JDBC, invokers. Next up the book includes web APIs, MongoDB with Scala, concurrency with Akka. The book explains a lot about Spark in detail. Moreover, the book covers resilient distributed datasets, running spark applications, spark SQL, data frames.

More about distributed computing is covered in the book. Further, the book includes distributed machine learning with MLib, pipeline components, estimators, and similar topics.

View On Amazon

Scala Programming for Big Data Analytics

Get started with Big Data Analytics using Apache spark

Irfan Elahi (Apress; 1st edition, July 2019 )

The book starts by giving a good introduction to Scala basics and also draws a parallel between Scala and Java.

Reading this book, you will learn how to leverage Scala for Big Data and Apache Spark. The book is not just about basics but dwells deep into several Apache spark APIs and covers data analytics in detail.

To begin with, the book gives a strong conceptual understanding of Scala. These programming constructs are explained keeping in mind big data and data analytics as a whole.

Through the book, you will read more about the development life cycle of Scala and the use of SBT (Scala Build Tool). Additionally, the dependency of SBT to build Apache Spark projects is covered here. Along the way, you will learn more about variables, data types, conditional statements, functions, collections, loops, etc.

Towards the end of the book, you will read through classes, packages, and exception handling. The book nicely explains how to use these features in the Apache Spark framework. Right through the book, you can see more about parallel and distributed computing which is one of the backbones of big data analytics. As you reach the end of the book you will be able to get practical exposure to Apache Spark.

The book is most suitable for data scientists and data engineers. Kindle as well as Paperback edition of the book is available.

View On Amazon

Scala for the Impatient 2nd Edition

Cay Horstmann (Addison-Wesley Professional, December 2016)

Scala for the Impatient is a book for experienced programmers specifically for programmers coming from Java, C++, Python, and other programming languages. While the book covers some basic concepts, the key focus remains the functional programming paradigm and modern programming patterns.

The first chapter of the book introduces Scala. Speaks more about the Scala interpreter, variable declaration. Additionally the book covers, commonly used types, calling methods, and application of methods.

The second chapter introduces controls in Scala and functions. This covers conditional expressions, loops, advance for loops, default, and named arguments. Along with this, procedures, lazy values, exception.

Next to this, you will learn arrays, traversing arrays, algorithms using arrays, multidimensional arrays. The book also covers maps, tuples, classes. Includes properties with getter/setter, bean properties, auxiliary constructors, nested classes.

With this the book covers objects, packages, imports, inheritance, file operations. You will also read regular expressions, Traits, operators, higher order functions, collections, streams. The later part of the book walks through topics such as annotations, XML processing, futures, type parameters, advance types, parsing and implicits.

The book is compact and covers all the basics required to work with Scala. The book is available in Kindle and Paperback formats.

View On Amazon

Scala Books for Functional Programming and Other Advanced Features

In this section, we will cover Scala books that focus specifically on functional programming paradigm and advanced programming concepts.

You might like this article: best Kotlin books.

Functional Programming in Scala 1st Edition

Paul Chiusano, Rúnar Bjarnason (Manning Publication, September 2014)

The book Functional programming in Scala takes a dig at some of the more complex features in Scala and how to use them for FP. The key topics covered in this book include –

  • Basic concepts of Functional programming
  • The need for FP and How to uses it
  • Multicore programming concepts
  • Practical exercises and quizzes

Organization of Topics

Starting first is an explanation of functional programming, post which you will learn how to use functional programming in Scala. This includes higher-order functions, anonymous functions, modules, objects, namespace.

Post this the book explains functional data structures, error handling, strict and non-strict functions. Further to this, some of the topics covered here are – lazy lists, memoizing streams, infinite streams, recursion. Through the first part of the book, you will learn more details about state actions.

The second part of the book covers functional parallelism. Following this, the book covers property-based testing, prop data types, test case evaluation, and testing higher-order functions. The next part of the book covers monoids, composing monoids, monad laws, traversable functors, applicative laws.

The last section of the book includes external effects and IO. Each topic is in-depth covering multiple subsections. The final sections of the book cover mutable arrays, running mutable state actions, stream processing, and extensible process types. Few topics you will read here are – single input processes, multiple-input processes, sinks, dynamic resource allocation.

In summary – This is one of the best book to learn functional programming in Scala. The book is available in Kindle and Paperback format.

View On Amazon

Functional Programming, Simplified

Alvin Alexander (CreateSpace Independent Publishing Platform, December 2017)

In case you are having a hard time understanding functional programming, then here is a book that is the right fit. Through the author’s journey to understand functional programming, the book simplifies FP. The author nicely covers the common misconceptions and then the learning path to functional programming.

Functional programming requires a lot of advanced Scala features and the book explains exactly that. The book guides you through writing a more Scala functional code along with explaining the benefits of functional programming. As you progress through the book, you will learn how to write pure functions.  

With a good background in functional programming in Scala, the book covers Scala recursion, a state in FP, Scala’s for-expressions, expression filtering in Scala, lambdas, etc. It is not all about the benefits of functional programming, the book also covers the disadvantages of functional programming. The book opens the various goals in functional programming, more about Scala check and Scala type classes.

This book gives a new perspective to Scala functional programming. Thus making these regularly heard Scala features more interesting to learn.

The book is available in Kindle and Paperback format.

View On Amazon

Scala Design Patterns

Design modular, clean, and scalable applications by applying proven design patterns in Scala

Ivan Nikolov (Packt Publishing, 2nd Edition, April 2018)

Undoubtedly design patterns play a crucial role in software development. So here is a book that focuses completely on building enterprise-level Scala applications using several design patterns. This in turn teaches you how to build robust and scalable applications using the power of Scala.

The book is well written and gives a walkthrough of frequently used industry design patterns. Additionally, the book explains the interrelation between Scala and design patterns along with the benefits of design patterns. The first section of the book covers creational design patterns. Following this, you will read more about lazy initialization, factory method, abstract factory, builder design pattern, and prototype design pattern. Explanation of each design pattern has enough Scala code.

The next section covers structural design patterns. Along with this, you will learn adapter, decorator, bridge, composite, façade, proxy, and flyweight design patterns. Each of these design patterns also covers the significance of real-world applications. The book explains why certain design patterns are more frequently used as compared to others.

Moving to the next section, you will see more about behavioral design patterns. The section provides deeper insights on observer design pattern, strategy, mediator, and a similar set of design patterns. Following this, you will read more about functional design patterns and Scala specific design patterns.

The book gives a good mix of Scala features along with implementing design patterns. As a bonus, you also learn how to choose the right design pattern for your implementation. The code samples make it crystal clear how Scala design patterns can be used. The book is available in Kindle and Paperback formats.

View On Amazon

Final Thoughts

Scala is a language suitable for Big Data and also has the potential to replace Java. Learning Scala does sound very promising but the ecosystem still lacks good learning resources.

Having said this, there are many books availalbe but you need to know which book to refer to for your style. With this, we come to an end of our review on scala books, hope you find the one that makes you happy. Cheers!

Comments ( 0 )

    Why Eduwyre

    Eduwyre helps you find the best courses, tutorials, books, and university certifications, reviewed by our experts and ranked by real verified students.

    Ⓒ 2020 eduwyre — All rights reserved