DEV Community

Discussion on: SOLID Principles in Swift: Single Responsibility Principle

Collapse
 
hyunssu profile image
gustn3965 • Edited

You are so professional!! I like your storytelling by representing real circumstance like iOS developer. I'm waiting for another principle example you will write.
By the way, I just wanna ask you that " Will be ViewController MVVC after refactoring ? "
And I think that it is prefer to extract making URLRequest by considering SRP. How about you?

Collapse
 
bionik6 profile image
Ibrahima Ciss • Edited

Thank you for your feedback, really appreciated :)
"Will be ViewController MVVC after refactoring ?", am not sure if I understand the question.
For the last question, I've extracted the networking to a separated struct (APIClient) and then I inject it to the LoginViewModel, so we have a loosely coupled code.