Chapter 3 - Data Layer - Networking

As I went through Chapter 3, I created this dependency model to help grasp the architecture. I have posted it here for two reasons:

  1. Please provide feedback if I missed anything or if anything is incorrect and needs to be changed.
  2. To help others who like visuals to try to grasp a concept.

Screen Shot 2022-05-31 at 3.25.23 PM


That looks fantastic!

@iaaqibhussain , any observations?

This is great. Thanks for this. Maybe in our next edition we can have something similar. :slight_smile:

@robertomachorro @iaaqibhussain
Thanks, glad you like it! I hope it helps others and doesn’t cause more confusion. :slight_smile:

Thanks for taking the time to create this visual. I bet that it helps consolidate your mental model.

I’m wondering about the significance of the colours you’ve used. Are they arbitrary, are these standard colours? Purple looks like it relates to protocols but then RequestProtocol is green.

As I create a similar visual model, I’m trying to describe the ‘why’ behind each of the components. Ultimately, I guess this follows the S in SOLID so that each class, each method has one job to do.

RequestProtocol - Separates implementation into individual requests that can be supplied to the request manager and fed down to the api manager.

RequestManager - Wraps the request call and attempts to parse the response using the DataParser.

APIManager - Uses a URLSession to make a request to an endpoint.

1 Like

Hello everyone, is there a discussion about using enums this way, like singletons.

This chapter is the first time I noticed it, and I have mixed feelings about it, but couldn’t find any discussion about it anywhere.


This diagram is so great! With the extremely deep directory structure, the book is very difficult for me. And many people are visual learners, you know, the whole picture worth a thousand words thing.

IMO diagrams like this should accompany every iOS tutorial on Kodeco. It takes me much longer to make sense of a wall of text (code) than it does a diagram.