Get Programming with Scala
Daniela Sfregola
  • MEAP began December 2017
  • Publication in Early 2019 (estimated)
  • ISBN 9781617295270
  • 475 pages (estimated)
  • printed in black & white
Scala is a multi-style programming language for the JVM that supports both object-oriented and functional programming. Master Scala, and you'll be well-equipped to match your programming approach to the type of problem you're dealing with. Packed with examples and exercises, Get Programming with Scala is perfect starting point for developers with some OO knowledge who want to learn Scala and pick up a few FP skills along the way.
Table of Contents detailed table of contents

Unit 0: Hello Scala!

Lesson 1: What is Scala and why it matters

1.1 What is Scala?

1.2 Why Scala?

Lesson 2: Scala — The REPL

Lesson 3: SBT — Scala Build Tool

3.1 Our first SBT Project

3.2 SBT Project Structure

3.3 Exercises

Unit 1: statements, expressions and values

Lesson 4: Values and Variables

4.1 Values

4.2 Variables

4.3 Lazy Values

4.4 Summary

4.5 Answers to quick checks

Lesson 5: Conditional Statements

5.1 If…​else statement

5.2 Pattern matching

5.3 Summary

5.4 Answers to quick checks

Lesson 6: Imports and Packages

6.1 Import an existing Package

6.2 Create a Package

6.3 Create a Package Object

6.4 Summary

6.5 Answers to Quick Checks

Lesson 7: Access Modifiers

Lesson 8: Capstone 1

Unit 2: structure your code

Lesson 9: Classes as a representation of our world

Lesson 10: Objects are important too!

Lesson 11: Traits as composable block of codes

Lesson 12: Tuples and Case classes to structure our data

Lesson 13: Capstone 2

Unit 3: functions

Lesson 14: Function as the most fundamental block of code

Lesson 15: Functions as First Class Citizens

Lesson 16: High Order Functions

Lesson 17: Anonymous Functions

Lesson 18: Capstone 3

Unit 4: collections

Lesson 19: Immutable and Mutable collections

Lesson 20: Working with List

Lesson 21: Working with Map

Lesson 22: Common operations on collections

Lesson 23: Capstone 4

Unit 5: common typesunit

Lesson 24: Option: a way to represent nullable data

Lesson 25: Either: one or the other

Lesson 26: Try: an operation that can fail

Lesson 27: Future: an operation that takes time

Lesson 28: Capstone 5

Unit 6: even more functions

Lesson 29: Pure and Impure Functions

Lesson 30: Partial Functions

Lesson 31: Curry and Closures

Lesson 32: Implicit functions

Lesson 33: Capstone 6

Unit 7 abstractions: never repeat yourself

Lesson 34: Generics: hide details that do not matter

Lesson 35: Bound your types

Lesson 36: Function composition

Lesson 37: Abstract constructs

Lesson 38: Capstone 7

Unit 8 testing

Lesson 39: Let’s unit test

Lesson 40: Let’s property-base test

Lesson 41: Let’s integration test

Lesson 42: Let’s functional test

Lesson 43: Capstone 8

Unit 9: clean code principles

Lesson 44: Write code that looks nice

Lesson 45: Small is always better

Lesson 46: Do only one thing, do it right

Lesson 47: Naming is a difficult art

Lesson 48: Recognize code smells

Lesson 49: Capstone 9

Unit 10: scala tricks that make your life easier

Lesson 50: Let’s be lazy!

Lesson 51: More on Pattern Matching

Lesson 52: More on For-comprehensions

Lesson 53: Pimp your library

Lesson 54: Type Classes

Lesson 55: Capstone 10

About the Technology

Although it's a relative newcomer, Scala turned out to be the right language at the right time, opening up the world of functional programming to the JVM. Scala looks a lot like Java, and it interacts seamlessly with familiar Java libraries and tools. Since it fully supports functional programming, Scala gives you the freedom to choose the right programming style exactly when it benefits you. Scala can be daunting at first, especially if you're seeing FP ideas for the first time. Fortunately, with the examples and exercises in this book, you'll get over the initial learning hump quickly and start doing interesting projects before you know it!

About the book

Get Programming with Scala teaches you the core skills you'll need to code with Scala. This book lives up to its name! You'll learn the ins and outs of Scala by actually programming with it, thanks to the practical examples, exercises, and easy-to-follow lessons. You'll start by reviewing OOP concepts in the Scala language. Then, example-by-example, you'll gradually open up the world of functional programming. You'll explore functions and types and learn how to combine them to create powerful, flexible abstractions. Along the way, you'll learn some Scala testing and get an intuition for sniffing out and fixing code that doesn't smell quite right.

What's inside

  • Learn to express OO principles in Scala
  • Express your program designs in functions
  • Make use of types to enforce program requirements
  • Use abstractions to avoid code duplication
  • Write meaningful tests and recognize code smells

About the reader

Written for developers with some prior experience in an OOP language like Java or C#. No experience with Scala or functional programming is needed.

About the author

Daniela Sfregola started working with Scala in 2013. Since then she has been an active contributor to the Scala Community. Daniela currently maintains several open source projects in the community and regularly speaks at Scala conferences. She blogs about Scala regularly at

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook

FREE domestic shipping on three or more pBooks