A design pattern in architecture and computer science is a formal way of documenting a solution to a design problem in a particular field of expertise.