Exit e-book
Show all chapters
01
Introduction
01. 
Introduction
Mastering Modularity in ZIO with Zlayer
01

Introduction

Writing modular applications is without a 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 structure of a Service is as suggested by ZIO.
  •  ZIO data types for writing modular applications: ZEnvironment and ZLayer.
  •  ZLayer type aliases.
  • How to organize a ZIO application around ZLayers.
  • How to create and combine ZLayers
  • How to organize ZIO tests and mocks around ZLayers.
  • How to reduce boilerplate when working with ZLayers.
  • How to automatically generate a diagram of your application’s dependencygraph.

Not a fan of reading online?

Download PDF

PREVIOUS
Chapter
00
NEXT
Chapter
02