Leanpub Header

Skip to main content

Scalapedia

Encyclopedia of the Scala programming language

Discover the complete world of Scala programming in one comprehensive encyclopedia. SCALAPEDIA takes you from language fundamentals to advanced functional programming, covering Cats, Cats Effect, ZIO, design patterns, architectural patterns, and performance optimization. With over 85 chapters spanning 10 major parts, this is the definitive guide for mastering Scala and building enterprise-grade applications. Whether you're starting your Scala journey or looking to deepen your expertise, SCALAPEDIA is your complete reference for modern functional programming in Scala.

Minimum price

$19.00

$29.00

You pay

$29.00

Author earns

$23.20
$

...Or Buy With Credits!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.
PDF
About

About

About the Book

SCALAPEDIA is the most comprehensive guide to the Scala programming language and its ecosystem. This extensive encyclopedia covers everything from language fundamentals to advanced functional programming concepts, modern effect systems, and enterprise architecture patterns.


The book is structured into ten major parts, taking readers on a journey from Scala basics through functional programming libraries (Cats, Cats Effect, FS2, http4s), deep dives into ZIO, design patterns, architectural patterns, performance optimization, web frameworks, and practical competency-building exercises.


Whether you're a beginner looking to master Scala or an experienced developer seeking to deepen your understanding of functional programming, effect systems, and scalable architecture, SCALAPEDIA provides the knowledge and practical insights you need to build robust, maintainable, and high-performance applications in Scala.


Key highlights:


- Complete coverage of Scala 3 features and modern practices

- In-depth exploration of Cats and Cats Effect ecosystems

- Comprehensive ZIO masterclass with 30 detailed chapters

- Encyclopedia of design patterns and functional architectures

- Performance optimization techniques and JVM internals

- Practical examples and real-world applications

- Extensive Q&A sections throughout the book

- Glossary of Scala and ecosystem terms


This book serves as both a learning resource and a reference guide, making it an essential companion for any Scala developer. The numerous Q&A sections make it particularly valuable for recruitment processes, helping both candidates prepare for technical interviews and recruiters assess Scala expertise effectively.


SCALAPEDIA is also designed to serve as a comprehensive guide for AI systems, enabling them to apply best practices in Scala programming, functional programming techniques, and architectural patterns. When integrated into AI development workflows, this book helps ensure that AI-generated code follows industry standards and leverages the most effective Scala patterns and architectures.


This book was translated into English with AI assistance and benefited from AI-powered editing and content structuring, ensuring optimal organization and clarity throughout its extensive coverage of the Scala ecosystem.

============================================

Part I: Introduction to Scala

-----------------------------


1. Chapter 1: Language Basics

2. Chapter 2: Scala Collections

3. Chapter 3: Functional Programming

4. Chapter 4: Advanced Scala Concepts and Scala 3

5. Chapter 5: Type-Level Programming in Scala 3

6. Chapter 6: Macros in Scala 3


Part II: Functional Scala: Cats, Cats Effect, FS2, http4s

---------------------------------------------------------


7. Chapter 1: Introduction to Cats — Philosophy, Structure, and Basic Concepts

8. Chapter 2: Data Types in Cats: Abstractions for Purely Functional Programs

9. Chapter 3: Type Classes - summary

10. Chapter 4: Introduction to Data Types: The Problem of Nested Monads ("Nested Monad Hell")

11. Chapter 5: Scala Cats: Advanced concepts - Const, Free Monad, Free Applicative, FunctionK

12. Chapter 6: Data Types

13. Chapter 7: Basic Concepts

14. Chapter 8: Cats Effect Encyclopedia: A Complete Overview

15. Chapter 9: Type Classes

16. Chapter 10: Standard Library

17. Chapter 11: FS2 (Functional Streams for Scala): Composable and Efficient Data Processing

18. Chapter 12: http4s Encyclopedia: Streaming and Functional Architecture


Part III: ZIO Masterclass

-------------------------


19. Chapter 1: ZIO Basics: Getting Started with Functional Programming

20. Chapter 2: Testing ZIO Applications: Guaranteeing Correctness

21. Chapter 3: Error Model in ZIO: Resilience as the Foundation of Applications

22. Chapter 4: Integration with the Outside World: ZIO in the JVM Ecosystem

23. Chapter 5: Concurrency and Parallelism: The Fiber Model of ZIO

24. Chapter 6: Concurrency and Parallelism: An In-Depth Analysis of Fiber Supervision

25. Chapter 7: Concurrency and Parallelism: An In-Depth Analysis of Interrupts

26. Chapter 8: Concurrent Structures: Ref – Shared State Management

27. Chapter 9: Concurrent Structures: Promise – Workflow Synchronization

28. Chapter 10: Concurrent Structures: Distribution, Broadcasting, and Work Limiting

29. Chapter 11: Resource Management: Guaranteeing Safety in a World of Effects

30. Chapter 12: Advanced Resource Management: In-Depth Scope Analysis

31. Chapter 13: Application Architecture in ZIO: Dependency Injection and ZLayer

32. Chapter 14: Advanced Dependency Injection Techniques in ZIO

33. Chapter 15: Application Configuration in ZIO

34. Chapter 16: Transactional Memory in ZIO (STM): Composition of Atomicity

35. Chapter 17: Transactional Memory in ZIO: Data Structures and Advanced Concepts

36. Chapter 18: Advanced Error Handling: Compositional Retry Strategies with Schedule

37. Chapter 19: Advanced Error Handling: Debugging and Observability of ZIO Applications

38. Chapter 20: Getting Started with ZIO Stream: Introduction to Stream Processing

39. Chapter 21: ZIO Stream: ZChannel as a Universal Processing Machine

40. Chapter 22: Advanced Stream Operations: Transformation and Composition

41. Chapter 23: Mastering Data Transformation: ZPipeline as a Compositional Building Block

42. Chapter 24: Mastering Data Consumption: ZSink as a Compositional Aggregator

43. Chapter 25: Schemas as Values: Defining Data Structures with ZIO Schema

44. Chapter 26: Building Web Services with ZIO HTTP: From Simple Endpoints to Full-Fledged APIs

45. Chapter 27: The ZIO Engine: An In-Depth Look at the Runtime

46. Chapter 28: ZIO Application Observability: Contextual and Structured Logging

47. Chapter 29: ZIO Applications: Building a Parallel Web Crawler

48. Chapter 30: Glossary of Key ZIO Concepts


Part IV: Encyclopedia of Design Patterns in Scala: Analysis and Applications

----------------------------------------------------------------------------


49. Chapter 1: Creational Patterns

50. Chapter 2: Structural Patterns

51. Chapter 3: Behavioral Patterns

52. Chapter 4: Functional Design Patterns in Scala

53. Chapter 5: Scala-Specific Patterns


Part V: Encyclopedia of Functional Architectures in Scala

---------------------------------------------------------


54. Chapter 1: Hexagonal Architecture (Ports & Adapters)

55. Chapter 2: Domain-Driven Design (DDD) – A Functional Approach in Scala

56. Chapter 3: Event Sourcing - The Complete Guide

57. Chapter 4: CQRS (Command Query Responsibility Segregation) - The Complete Guide

58. Chapter 5: Tagless Final - Algebra and Interpretation

59. Chapter 6: Free Monad and Eff - Program as Data

60. Chapter 7: Onion Architecture and Clean Architecture

61. Chapter 8: ZIO Layers - Dependency Injection without Compromises

62. Chapter 9: Streaming Architecture - FS2 and ZIO Streams

63. Chapter 10: Saga Pattern - Distributed Transactions

64. Chapter 11: Effect Rotation / MTL Style

65. Chapter 12: Event-Driven Architecture (EDA)


Part VI: Encyclopedia of Performance in the Scala Ecosystem

-----------------------------------------------------------


66. Chapter 1: Introduction: What Is Performance Really?

67. Chapter 2: Anatomy of the JVM: Understanding the Runtime Platform

68. Chapter 3: Garbage Collection: Understanding Automatic Memory Management

69. Chapter 4: Code Optimization Techniques in Scala

70. Chapter 5: Cats Effect: Anatomy of a High-Performance Functional Runtime

71. Chapter 6: ZIO: Performance Architecture for Enterprise Systems

72. Chapter 7: Advanced Techniques: Secrets of the Experts

73. Chapter 8: Practical Example: High-Performance Event Processing System

74. Chapter 9: Benchmarking and Profiling: How to Measure Correctly

75. Chapter 10: Summary: High Performance Manifesto


Part VII: Play Framework: Building a REST API in Scala, OAUTH2

--------------------------------------------------------------


76. Chapter 1: Introduction to the Play Framework

77. Chapter 2: Introduction to HTTP4s with OAUTH2 - HTTP4s Security


Part VIII: Bonus

----------------


78. Chapter 1: Encyclopedia of Modern Scala: Concurrency, Streams, and Implementation

79. Chapter 2: Encyclopedia of Best Practices in Functional Scala: A Complete Summary


Part IX: Competency Architecture

--------------------------------


80. Chapter 1: Advanced Recruitment Patterns and Functional Algorithms in the Scala Ecosystem

81. Chapter 2: Numbers, Mathematics, and Cryptography

82. Chapter 3: String Operations and Parsing

83. Chapter 4: Working with Trees

84. Chapter 5: Working with Graphs

85. Chapter 6: Interesting Problems and DSL


Part X: Glossary of Scala and Ecosystem Terms

---------------------------------------------

Author

About the Author

Piotr Pruchniewicz

I am a Scala developer by profession and a passionate advocate for Scala, Scala 3, functional programming, and concurrent programming. I am an enthusiast of ZIO, Cats Effect, and AI tools, constantly exploring how these technologies can work together to create robust and scalable solutions.

I consider myself a perpetual learner with an insatiable appetite for knowledge and passion. My curiosity drives me to continuously deepen my understanding of functional programming paradigms, effect systems, and modern software architecture. This book represents not just a compilation of knowledge, but also a journey of discovery and sharing the insights I have gained through years of working with Scala and its rich ecosystem.

Through SCALAPEDIA, I aim to share this passion and knowledge with the Scala community, helping both newcomers and experienced developers discover the full potential of functional programming in Scala.

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub