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

1 Like

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