Some Software Design Principles
Some Software Design Principles 1. Don’t Repeat Yourself (DRY) 2. Keep It Simple, Stupid (KISS) Making something complex is easy, but making something complex simple is difficult.
3. Program to an interface, not an implementation Prefer composition over inheritance Dependency inversion principle 4. Command-Query Separation (CQS) Query: when a method returns a value to answer a question Command: when a method changes the state of an object 5. You Ain’t Gonna Need It (YAGNI) Only design and implement what is necessary. Avoid overengineering. Implement what you need now; add more when needed later.