As I went through Chapter 3, I created this dependency model to help grasp the architecture. I have posted it here for two reasons:
- Please provide feedback if I missed anything or if anything is incorrect and needs to be changed.
- To help others who like visuals to try to grasp a concept.
That looks fantastic!
@iaaqibhussain , any observations?
This is great. Thanks for this. Maybe in our next edition we can have something similar.
Thanks, glad you like it! I hope it helps others and doesn’t cause more confusion.
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.