Why do we need design patterns

Why do we need design patterns like Factory, abstract Factory and Singleton?

+6
source share
3 answers

Design patterns provide easy recognition and use of OOP solutions for common problems. They are easy to maintain because many people are familiar with them. This is very similar to how Google works. Everyone knows HOW Google, so when you get a request like “What is the purpose of design patterns”, you can very quickly use this common interface to solve the problem.

Design patterns also address specific programming challenges regarding usability and ease of maintenance. Take the book " Gang of Four" and look at it.

+15
source

If the problem arises again and again, the solution to this problem is effectively used. This solution is described as a template.

+7
source

, . , . , , , .

"" , "" . , , java, , . : Javascript, , (, , , ).

+5

All Articles