get_programming_with_scala

Get Programming with Scala

Return to Scala Bibliography, Scala

Get Programming with Scala

Daniela Sfregola

July 2021 ISBN 978-1617295270 560 pages printed in black & white

“This book is by far the best introduction to Scala that I have ever read.” – SCOTT DIERBECK, MINDUP

The perfect starting point for your journey into Scala and functional programming.

In Get Programming in Scala you will learn:

Object-oriented principles in Scala Express program designs in functions Use types to enforce program requirements Use abstractions to avoid code duplication Write meaningful tests and recognize code smells

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 the perfect starting point for developers with some OO knowledge who want to learn Scala and pick up a few FP skills along the way.

about the technology

Scala developers are in high demand. This flexible language blends object-oriented and functional programming styles so you can write flexible, easy-to-maintain code. Because Scala runs on the JVM, your programs can interact seamlessly with Java libraries and tools. If you’re comfortable writing Java, this easy-to-read book will get you programming with Scala fast.

about the book

Get Programming with Scala is a fast-paced introduction to the Scala language, covering both Scala 2 and Scala 3. You’ll learn through lessons, quizzes, and hands-on projects that bring your new skills to life. Clear explanations make Scala’s features and abstractions easy to understand. As you go, you’ll learn to write familiar object-oriented code in Scala and also discover the possibilities of functional programming.

what's inside

Apply object-oriented principles in Scala Learn the core concepts of functional programming Use types to enforce program requirements Use abstractions to avoid code duplication Write meaningful tests and recognize code smells

about the reader

For developers who know an OOP language like Java, Python, or C#. No experience with Scala or functional programming required.

about the author

Daniela Sfregola is a Senior Software Engineer and a Scala user since 2013. She is an active contributor to the Scala Community, a public speaker at Scala conferences and meetups, and a maintainer of open-source projects.


Copyright 2021 Manning Publications

https://forums.manning.com/forums/get-programming-with-scala

welcome

“Thank you for purchasing the MEAP edition of Get Programming with Scala, and welcome to the magical world of Scala! I am really excited to share with you the units for this book that I have written so far: I hope you’ll find them useful and that you’ll provide your feedback to make this book even better.”

“Until recently, Object Oriented Programming (OOP) was considered the style to follow. But with the growing need for handling concurrency and multi-core processing, Functional Programming (FP) is becoming more and more popular. We are in a transition period where developers are familiar with the OOP paradigm, but they would like to learn more about FP. Scala is establishing itself in this niche, as it allows programmers to combine the two approaches.

Scala is a beautiful, powerful language that is extremely pleasant to use, but it has the reputation of being difficult to learn. With Get Programming with Scala, I want to teach you the basics of Scala and Functional Programming. After reading this book, you should be able to write fully working and practical programs in Scala, and you should have the tools to keep exploring the world of Functional Programming in Scala on your own. I am going to assume you have done some programming with an object-oriented language such as Python, Java, or C++. Do not worry if you don’t know any functional programming: you are going to discover how useful it can be while reading this book!

Get Programming with Scala will begin by reviewing how you can write object-oriented code in Scala by learning about variables and values, classes and objects. You will then start your journey towards a more functional mind-set by discovering how functions and types can be used to produce powerful abstractions. You will also learn about testing and how to recognize and fix code that “doesn’t look quite right.”

Throughout the book, you will see lots of code examples and exercises to help you master the topics of each unit. The source code presented in the lessons and the solutions to the exercises are available online at https://github.com/DanielaSfregola/get-programming-with-scala.

I hope you’ll find this book useful. Please post any questions, comments, or suggestions in the Author Online Forum: your feedback is invaluable in improving Get Programming with Scala!

Thanks!

—Daniela Sfregola

brief contents

Unit 0: Hello Scala!

Lesson 1: Why Scala?

Lesson 2: The Scala Environment

Lesson 3: sbt – Scala Build Tool

Unit 1: The basics

Lesson 4: Values and Variables

Lesson 5: Conditional Constructs and Loops

Lesson 6: Function as the most fundamental block of code

Lesson 7: Classes and Subclasses to represent the world

Lesson 8: The Vending Machine

Unit 2: Object-Oriented Fundamentals

Lesson 9: Import and Create Packages

Lesson 10: Scope your code with Access Modifiers

Lesson 11: Singleton Objects

Lesson 12: Traits as interfaces

Lesson 13: What time is it?

Unit 3: HTTP Server

Lesson 14: Pattern Matching

Lesson 15: Anonymous Functions

Lesson 16: Partial Functions

Lesson 17: HTTP API with http4s

Lesson 18: The Time HTTP Server

Unit 4: Immutable Data and Structures

Lesson 19: Case classes to structure your data

Lesson 20: Higher Order Functions

Lesson 21: What is Purity?

Lesson 22: Option

Lesson 23: Working with Option: map and flatMap

Lesson 24: Working with Option: for-comprehension

Lesson 25: Tuple and Unapply

Lesson 26: Rock, Paper, Scissors, Lizard, Spock!

Unit 5: list

Lesson 27: List

Lesson 28: Working with List: map and flatMap

Lesson 29: Working with List: properties

Lesson 30: Working with List: element selection

Lesson 31: Working with List: filtering

Lesson 32: Working with List: sorting and other operations

Lesson 33: The Movies Dataset

Unit 6: Other Collections and Error Handling

Lesson 34: Set

Lesson 35: Working with Set

Lesson 36: Map

Lesson 37: Working with Map

Lesson 38: Either

Lesson 39: Working with Either

Lesson 40: Error Handling with Try

Lesson 41: The Library Application

Unit 7: Concurrency

Lesson 42: Implicit and Type Classes

Lesson 43: Future

Lesson 44: Working with Future: map and flatMap

Lesson 45: Working with Future: for-comprehension and other operations

Lesson 46: Database queries with Quill

Lesson 47: The Quiz Application: Part 1

Unit 8: JSON (De)Serialization

Lesson 48: JSON (De)serialization with circe

Lesson 49: Lazy Evaluation

Lesson 50: The IO type

Lesson 51: Working with the IO type

Lesson 52: Testing with ScalaTest

Lesson 53: The Quiz Application: Part 2

About this book

Until recently, Object-Oriented Programming (OOP) was considered the style to follow. But with the growing need for handling concurrency and multi-core processing, Functional Programming (FP) is becoming more and more popular. We are in a transition period where developers are familiar with the OOP paradigm, but they would like to learn more about FP. Scala is establishing itself in this niche, as it allows programmers to combine the two approaches.

Scala is a beautiful, powerful language that is extremely pleasant to use, but it has the reputation of being difficult to learn. With Get Programming with Scala, you are going to learn the basics of Scala and Functional Programming. After reading this book, you’ll be able to write complete applications in Scala, and you’ll have the tools to keep exploring the world of Functional Programming in Scala on your own. I am going to assume you have done some programming experience with any object-oriented language such as Python, Java, or C++. You do not need any prior functional programming knowledge: you are going to discover its beauty and usefulness in this book.

Get Programming with Scala will begin by showing you how to write object-oriented code in Scala by learning about values, classes, and objects. You will then start your journey towards a more functional mindset by discovering how you can use functions and types to produce powerful abstractions. You will also learn how to recognize and fix code that “doesn’t look quite right.”

Throughout the book, you will see lots of code examples and quizzes to help you master the topics of each unit. Its source code, exercises, and solutions are available on GitHub at https://github.com/DanielaSfregola/get-programming-with-scala.

Fair Use Source: https://www.manning.com/books/get-programming-with-scala

get_programming_with_scala.txt · Last modified: 2024/04/28 03:23 (external edit)