Design Principles and Patterns - suniladhya/Advantage GitHub Wiki

In solving day to day problems and maintaining the standards, we need the design patterns and Design Principles.

Few of them that can be used by a Programmer in day to day life are as Follow:

Design Principles

  • KISS

  • YAGNI

  • DRY

  • SOLID

Design Patterns:

  • Singleton pattern

  • Factory Pattern

  • Strategy Pattern

Design principle doesn't have any hard and fast rules of applying it. It varies as per the experience and expertise level of the developer.

Where As,

Design Patterns are the strategy to fix a certain problem. Hence irrespective of experience and expertise, the codes are the Same.

KISS:

  • 40 Line of codes.
  • Least Dependency.
  • Should have one specific purpose codes.**

YAGNI

  • A principle of extreme programming (XP)
  • Programmer should not add functionality until deemed necessary
  • No commented codes.
  • XP co-founder Ron Jeffries has written: "Always implement things when you actually need them, never when you just foresee that you need them.

DRY

  • Every piece of knowledge or logic must have a single, unambiguous representation within a system.
  • avoiding the repetition of any part of a system(testing, debugging, deployment)
  • Achieved by applying normalization to avoid redundancy
⚠️ **GitHub.com Fallback** ⚠️