We know that the ancient emperors wanted to manage the country, but it was impossible to manage every people. Therefore, many institutions were set up, such as three provinces and six ministries. There were many small organizations under these institutions. They managed the country together. For another example, a large company has many small d ...
Posted by melmoth on Sat, 30 Apr 2022 07:42:32 +0300
Observer mode structure
There are four roles in the structure of observer mode:
(1) Observable: a topic is an interface that specifies the methods to be implemented for a specific topic, such as adding and deleting observers and notifying observers to update data. (2) Observer: an observer is an interface that specifies the method used by a ...
Simple factory mode:
Its disadvantage is that adding new products will violate the "opening and closing principle". This mode is the simplest way to create and manage objects, because it simply encapsulates the creation of different classes of objects. This pattern specifies the object to be created by passing the type to the fac ...
Posted by ciaran on Fri, 29 Apr 2022 22:35:58 +0300
Design Mode - Creative Mode
Creative modes have the following patterns:
Singleton modeAbstract Factory ModePrototype modeBuilder patternFactory Mode
Note: The abstract factory mode and the builder mode are also considered factory mode
Introduction to single-case design patterns
The so-called singleton design mode of a c ...
Posted by rayzun on Thu, 28 Apr 2022 23:17:46 +0300
Original link: Take you to read several common design patterns first bullet I hope you can pay attention to my official account. There is a QR code at the end of the text. Thank you!
The purpose of writing design patterns is mainly to pave the way for writing spring series articles later. As we all know, spring uses a lot of d ...
Posted by csaba on Thu, 28 Apr 2022 19:39:21 +0300
This article is a note made by myself after learning the graphic design mode of Mr. Han Shunping from Shang Silicon Valley. The code is all typed according to the video. I don’t know if there will be any suspicion of reprinting. If so, please remind me, thank you!
Welcome to leave a message to discuss!
1 Adapter mode
A p ...
Posted by riddhi on Thu, 28 Apr 2022 12:27:32 +0300
What is an agent For example, you ask your friend (entrusted class, also known as agent class) to bring you food, and then your friend brings it to you when he goes out to dinner. At this time, you are in the dormitory bb and ask him to bring you a drink. At this time, your friend also endured and brought you drinks, but if you a ...
Posted by dull1554 on Wed, 27 Apr 2022 18:46:25 +0300
I have made a theme switching framework. I'll introduce myself here. Let's see if it's useful. Criticism and correction are welcome.
Project address: https://github.com/l0neman/ThemeFramework
The following is the readme of the project MD readme file.
Android instant theme switching framework
The core is that based on ...
Posted by centipede on Wed, 27 Apr 2022 12:33:16 +0300
There are 23 design patterns mentioned in the book jointly published by GOF (Erich Gamma, Richard Helm, Ralph Johnson and John vlisides), which can be divided into three categories: creative patterns, Structural Patterns and Behavioral Patterns.
Characteristics of agent model
In this chapter, we mainly introduce the Proxy Pattern ...
Posted by leetcrew on Wed, 27 Apr 2022 11:17:33 +0300
Abstract: This paper will first introduce the definition of Antlr4 grammer, how to generate the corresponding AST through Antlr4 grammer, and two AST traversal modes of Antlr4: Visitor mode and Listener mode.
1. Brief introduction to antlr4
Antlr4 (Another Tool for Language Recognition) is an open-source parser generation tool developed ba ...
Posted by shuka79 on Wed, 27 Apr 2022 02:44:02 +0300