“In computer programming, SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion) is a mnemonic acronym introduced by Robert C. Martin in the early 2000s which stands for five basic principles of object-oriented programming and design.” by Wikipedia
Most common and famous design principles are given bellow. And some rapid fire definition to remember. Often I wonder what is the best way to train you so that you always follow the design principles. Best answer is there is non, and practice is the key to success.
- Liskov Substitution Principle (http://en.wikipedia.org/wiki/Liskov_substitution_principle)
- Open Close principle (http://en.wikipedia.org/wiki/Open/closed_principle)
- Tell,Don't ask (http://pragprog.com/articles/tell-dont-ask)
- DRY (http://en.wikipedia.org/wiki/Don't_repeat_yourself) AKA “Once and only once
- Hollywood Principle (http://en.wikipedia.org/wiki/Hollywood_principle)
- The law of Demeter (http://en.wikipedia.org/wiki/Law_of_Demeter)
- Dependency Inversion Principle (http://en.wikipedia.org/wiki/Dependency_inversion_principle)
What is more important?
Design Pattern, Design Principles, Code Smell, or refactoring, an honest answer is all of them. So if we want to become more productive developer and enhance the learning and knowledge we ought to learn and get by heart those key words and practice them.
Until next time, happy coding.