Home  >  Article  >  Backend Development  >  23 design patterns for PHP 1

23 design patterns for PHP 1

不言
不言Original
2018-04-17 09:21:251626browse

This article introduces the 23 design patterns of PHP 1, which has certain reference value. Now I share it with you. Friends in need can refer to it

1. Design Patterns Classification

Generally speaking, design patterns are divided into three categories:

Creative patterns, a total of five types: factory method pattern, abstract factory pattern, singleton pattern, builder pattern, prototype pattern .

There are seven structural modes: adapter mode, decorator mode, proxy mode, appearance mode, bridge mode, combination mode, and flyweight mode.

Behavioral patterns, eleven in total: strategy pattern, template method pattern, observer pattern, iterative sub-pattern, chain of responsibility pattern, command pattern, memo pattern, state pattern, visitor pattern, intermediary pattern , interpreter mode.

In fact, there are two categories: concurrent mode and thread pool mode





The above is the detailed content of 23 design patterns for PHP 1. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn