Exit e-book
Show all chapters
01
Introduction
01. 
Introduction

Sign up to our Newsletter

Signing up to our newsletter allows you to read all our ebooks.

I agree to receive marketing communication from Scalac.
You can unsubscribe from these communications at any time. For more information on how to unsubscribe, view our Privacy Policy.

Mastering Modularity in ZIO with Zlayer
01

Introduction

Writing modular applications is without doubt very important in software engineering. Being able to split a problem into smaller parts and put them back together to build large applications is an essential concept. It allows us to build software no matter the amount of complexity involved.  In fact, composability has been one of the core principles of ZIO from the very beginning. So, for getting a good grasp on how great ZIO is for modularity, this document will be about writing a Tic-Tac-Toe application using the ZLayer data type.

Here is what you will learn:

  • What the module structure is as suggested by ZIO.
  • ZIO data types for writing modular applications: ZLayer and Has.
  • ZLayer type aliases.
  • How to organize a ZIO application around ZLayers.
  • How to create and combine ZLayers, with horizontal and vertical composition.
  • How to organize ZIO tests and mocks around ZLayers.
  • How to reduce boilerplate when working with ZLayers, by using the ZIO Magic library.

Not a fan of reading online?

Download PDF

PREVIOUS
Chapter
00
NEXT
Chapter
02