Daily iOS
Architecture

SOLID principles

Can you explain the five SOLID principles with iOS code examples, not shapes and animals?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

SRP (a view controller doing networking too), OCP (extend through a protocol instead of adding switch cases), LSP (a subclass breaking the parent's contract), ISP (splitting a giant delegate protocol), DIP (depending on a protocol instead of a concrete URLSession).

Share a question