"These principles, when combined together, make it easy for a programmer to develop software that are easy to maintain and extend." -Robert 'Uncle Bob' Martin
S - Single-Responsibility - objects should only serve one purpose
O - Open-Closed - types should be open to extending capabilities, closed to base changes
L - Liskov Substitution - subtypes of base types should produce objects compatible with base
I - Interface Segregation - client types do not have to depend on unused interface methods
D - Dependency Inversion - rely on abstract templates, not prescriptive/restrictive concretes
Reference: https://scotch.io/bar-talk/s-o-l-i-d-the-first-five-principles-of-object-oriented-design
No comments:
Post a Comment