摘要:
Purpose: Decouple an abstraction from its implementation so that the two can vary independently FormatterInterface.php PlainTextFormatter.php HtmlForm 阅读全文
posted @ 2019-05-08 18:12
Victor!!!!
阅读(181)
评论(0)
推荐(0)
摘要:
Purpose: To translate one interface for a class into a compatible interface. An adapter allows classes to work together that normally could not becaus 阅读全文
posted @ 2019-05-08 17:25
Victor!!!!
阅读(122)
评论(0)
推荐(0)
摘要:
Structural Design Patterns are Design Patterns that ease the design by identifying a simple way to realize relationships between entities. 阅读全文
posted @ 2019-05-08 16:38
Victor!!!!
阅读(216)
评论(0)
推荐(0)
摘要:
Creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situati 阅读全文
posted @ 2019-05-08 16:34
Victor!!!!
阅读(330)
评论(0)
推荐(0)
摘要:
Purpose: Similiar to the AbstractFactory, this pattern is used to create series of related or dependent objects. The difference between this and abstr 阅读全文
posted @ 2019-05-08 15:51
Victor!!!!
阅读(172)
评论(0)
推荐(0)
摘要:
Purpose: This is considered to be an ANTI-PATTERN! We could use dependency injection to replace this pattern. To have only one instance of object in t 阅读全文
posted @ 2019-05-08 15:34
Victor!!!!
阅读(149)
评论(0)
推荐(0)
摘要:
Purpose: It differs from the static factory because it is not static. Therefore, you can have multiple factories, differently parameterized, you can s 阅读全文
posted @ 2019-05-08 14:50
Victor!!!!
阅读(130)
评论(0)
推荐(0)
摘要:
Purpose: To avoid the cost of creating objects the standard way (new Foo()) and instead create a prototype and clone it. BookPrototype.php BarBookProt 阅读全文
posted @ 2019-05-08 10:25
Victor!!!!
阅读(211)
评论(0)
推荐(0)