Tag:Design Patterns

  • After finishing the 2340 page interview questions, I feel that I can live a good life

    Time:2020-11-27

    Interview questions for a new version of Internet factory in May 2020 Co classification65 copies PDF,2340 pages in total! Front end, back-end data I occupy! The new version of Internet interview question bank is very comprehensive Including Java collection, JVM, multithreading, concurrent programming, design pattern, spring family bucket, Java, mybatis, zookeeper, Dubbo, elasticsearch, memcached, mongodb, […]

  • PHP design pattern code examples of null object (25)

    Time:2020-11-25

    objective The empty object pattern is not a GOF design pattern, but it is enough to be considered a design pattern as a frequent pattern. It has the following advantages: The client code is simple It can reduce the probability of null pointer exception Test cases don’t need to consider too many conditions Return an […]

  • Strategy of PHP design pattern

    Time:2020-11-24

    This paper describes the strategy pattern strategy of PHP design pattern. For your reference, the details are as follows: 1. Overview In software development, there are many algorithms to realize a certain functionStrategy, we can choose different algorithms or strategies according to different environment or conditions to complete the function。 For example, hard coding is […]

  • Introduction to PHP design patterns [concept, classification, principles, etc.]

    Time:2020-11-23

    This article describes the PHP design pattern. For your reference, the details are as follows: 1. Design pattern Design pattern is a set of repeated use, most people know, after classification cataloging, code design experience summary. Design patterns are used to reuse code, make it easier for others to understand, and ensure code reliability. No […]

  • PHP design pattern (1) factory mode

    Time:2020-11-22

    This paper describes the PHP design pattern (1) factory mode. For your reference, the details are as follows: In object-oriented programming, the most common method is to generate an object instance by a new operator. The new operator is used to construct the object instance. However, in some cases, the new operator directly generates objects, […]

  • PHP design pattern (3) builder mode

    Time:2020-11-21

    This paper describes the PHP design pattern: Builder mode builder. For your reference, the details are as follows: 1. Overview In the process of software development, when a “complex object” is created, the object is composed of sub objects of certain parts with a certain algorithm. Due to the change of requirements, each part of […]

  • PHP design pattern (4) prototype mode prototype example details

    Time:2020-11-20

    This article describes the PHP design pattern: prototype pattern prototype. For your reference, the details are as follows: 1. Overview As we all know, the creation pattern is generally used to create a new object, and then we use this object to complete some object operations. We can quickly create an object through the prototype […]

  • PHP design pattern (5) adapter mode

    Time:2020-11-19

    This article describes the PHP design pattern: adapter pattern adapter. For your reference, the details are as follows: 1. Overview:          Interface change is a common problem that programmers have to accept and deal with (though reluctantly). Program providers modify their code; system libraries are modified; various programming languages and related libraries develop and evolve. […]

  • PHP design mode (6) bridge connection mode

    Time:2020-11-18

    This paper describes the PHP design pattern: bridge mode. For your reference, the details are as follows: 1. Overview In software system, some types have two or more dimensional changes due to their own logic. How to deal with such “multi-dimensional changes”? How to use object-oriented technology to make the type easily change along multiple […]

  • PHP design pattern (7) composite mode

    Time:2020-11-17

    This article describes the PHP design pattern: composite pattern. For your reference, the details are as follows: 1. Overview In the data structure, the tree structure is very important, we can apply the tree structure to the design pattern. Example 1: it is a multi-level tree menu. Example 2: file and folder directory 2. Problems […]

  • PHP design pattern (8) decorator pattern illustrator

    Time:2020-11-16

    This article describes the PHP design pattern: decorator pattern decorator. For your reference, the details are as follows: 1. Overview If you’ve been in object-oriented development, you can add behavior to a class or object, and use inheritance mechanism. This is a basic feature of all object-oriented languages. If an existing class lacks some methods, […]

  • PHP design pattern (9) facade example details [structural]

    Time:2020-11-15

    This article describes the PHP design pattern: facade. For your reference, the details are as follows: 1. Overview In appearance mode, we can only see the appearance objects but not the specific details objects by wrapping the appearance. This will undoubtedly reduce the complexity of the application and improve the maintainability of the program.Example 1: […]