7 - Design Mode - builder mode
1, What is the builder model
Builder Pattern, also known as Builder Pattern, is an object construction pattern. It can abstract the construction process of complex objects (abstract categories), so that different implementation methods of this abstract process can construct objects with different representations (attributes).
Builder mode is ...
Added by new@php on Mon, 28 Feb 2022 00:05:13 +0200
Kotlin - improved factory model
Welcome to WeChat official account: FSA full stack operation ๐
1, Foreword
Design pattern is a guide to solve specific problems in software engineering. We often say that there are 23 design patterns in Java. As a better Java, Kotlin with multi paradigm has many new language features. What improvements can be made when using the design pat ...
Added by B of W on Sun, 27 Feb 2022 17:41:15 +0200
Design mode_ 23 visitor mode
23 visitor mode
23.1 concept
Encapsulates some operations that act on each element in a data structure. New operations that act on these elements can be defined without changing the data structure.
23.2 structure
Abstract visitor role: defines the behavior of accessing each element. Its parameters are the accessible elements. Theoretica ...
Added by Perry Mason on Fri, 25 Feb 2022 12:43:55 +0200
[dependency reversal principle] of design principle
My cousin asked me to repair her radio, which confused me
Cousin: brother, my computer blue screen crashed ๐
Me: let me show you.
One meal operation
Me: you have two memory modules here, but one of them is broken. I'll unload it now and use the good one for the time being.
Cousin: Wow! Sure enough, that's great ๐ By the way, broth ...
Added by mysterbx on Fri, 25 Feb 2022 05:38:51 +0200
Design mode_ 21 intermediary model
21 intermediary model
21.1 concept
Define a mediation role to encapsulate the interaction between a series of objects, so that the coupling between the original objects is loose, and the interaction between them can be changed independently. Multiple classes are interrelated, showing a complex network structure and over coupling. The medi ...
Added by summoner on Thu, 24 Feb 2022 17:00:14 +0200
[dynamic agent] the most user-friendly dynamic agent blog in history (I think, ha ha, after reading a lot of blogs that have been read for 10000...)
Dynamic agent (JDK agent)
Let's start with a few points:
What is dynamic agent?
Dynamic agents are still agents in essence
However, the relationship between the agent and the represented object is dynamically determined. For example, Wang Ergou's colleague Niu Cuihua did not determine her attorney before the court session, but chose a law ...
Added by Floodboy on Tue, 22 Feb 2022 11:58:18 +0200
Design mode - singleton mode
1, Definition of singleton mode
Definition: ensure that there is only one instance of a class and provide the global access point of the instance.
The advantage of this is: for some instances, only one global instance is enough. Using the singleton mode can avoid the frequent creation and destruction of a global class, which consumes system r ...
Added by SusanMoore on Sun, 20 Feb 2022 18:59:06 +0200
SystemUI system status bar status bar analysis (Android o)
System status bar status bar analysis (Android o)
1 Overview
In the system UI, the status bar provides users with some quick information display and function operation. The user can display more information on the screen in a reasonable way through the drop-down bar. On the 848 platform, there are two configurable status bars: StatusBar a ...
Added by slick101 on Sun, 20 Feb 2022 14:16:23 +0200
[design mode] combination mode
Full analysis of 23 design patterns (implemented in JAVA).
Introduction:
Composite Pattern, also known as partial overall pattern, is used to treat a group of similar objects as a single object. The combination mode combines objects according to the tree structure, which is used to represent the partial and overall levels. This type of de ...
Added by harrison on Sun, 20 Feb 2022 11:10:13 +0200
01_ Single case design mode
4. Creation mode
The main focus of creative mode is "how to create objects?", Its main feature is "separating the creation and use of objects".
This can reduce the coupling degree of the system, and users do not need to pay attention to the creation details of objects.
The creation mode is divided into:
Singleton modeFac ...
Added by jeff_borden on Sun, 20 Feb 2022 04:47:20 +0200