The fundamental reason for using design patterns is to adapt to changes, improve code reuse rate, and make software more maintainable and scalable. In addition, the following principles should be followed when designing: single responsibility principle, open and closed principle, Richter substitution principle, dependency inversion principle, interface isolation principle, composite reuse principle and Dimit principle. Each design principle is described below.