Design pattern combination pattern
practical problem
In the company, there are many levels, such as chairman, Department Manager, technician, ordinary employees, etc. you are a tree structure. Each tree contains members and departments, and departments contain departments and members, and so on. Members are equivalent to leaves and departments are equivalent to branches. Each ...
Posted by slurpee on Sat, 15 Jan 2022 01:15:21 +0100
Vi Memo mode
0. Excerpt from design pattern
A memo is an object that stores the state of another object at a certain point in time. The latter is called the originator of the memo. Before the state changes, the initiator initializes a memo object according to the current state. Only the originator can access the information in the memo. The originator can ...
Posted by DontheCat on Thu, 13 Jan 2022 13:13:05 +0100
Vi Structural - sharing mode
0. Excerpt from design pattern
Question: In a document editor, each character in the document can be described as an object: Too memory consuming, a small document may contain thousands of character objects. Solution: Shared object. Each character is represented by an object. All the characters in the document share this object. All characte ...
Posted by discosuperfly on Thu, 13 Jan 2022 10:18:10 +0100
Android DataBinding from getting started to advanced
DataBinding is a framework officially released by Google. As its name suggests, it is data binding. It is an implementation of MVVM mode on Android. It is used to reduce the coupling between layout and logic and make the code logic clearer. Compared with MVP, MVVM actually replaces the Presenter layer with the ViewModel layer. DataBinding can o ...
Posted by llirik on Wed, 12 Jan 2022 21:52:50 +0100
03 construction mode Quarkus implementation
Abstract: This paper describes the construction pattern in Gof 23 design pattern with an example scenario, and implements it with Quarkus framework code. At the same time, it also gives the UML model of the implementation code. Key words: Gof 23 design mode construction mode Quarkus
1 basic knowledge 1.1 standard definition Construction patter ...
Posted by HaLo2FrEeEk on Wed, 12 Jan 2022 07:39:43 +0100
One click AI coloring, black and white old photos, the picture is instantly fresh
Many old photos or movies are limited by the technology of the times and can only be saved in black and white; The edited black-and-white videos and pictures have long lost the original color pictures, which is a great pity for the savers. How can we turn a single boring and old mottled black-and-white photo into a fresh and bright color photo, ...
Posted by Caps on Wed, 12 Jan 2022 04:30:20 +0100
Design mode - template method mode ~ cold dew
Template Method Pattern
TitleModuleCategoryTags
Template Method
template-design
Behavior
Gang of Four
Introduction to template method mode
Template method pattern refers to defining the algorithm framework behavior in an operation and delaying some ste ...
Posted by jbog91 on Tue, 11 Jan 2022 16:54:28 +0100
[design mode from introduction to mastery] 17 - intermediary mode
Note source: Shang Silicon Valley Java design pattern (illustration + framework source code analysis)
Intermediary model
1. Smart home management issues
Smart home project:
1) Smart home includes various devices, alarm clock, coffee machine, TV, curtain, etc 2) When the host wants to watch TV, various devices can work together to au ...
Posted by inrealtime on Tue, 11 Jan 2022 15:12:12 +0100
Option mode of Golang common design mode
Students familiar with Python development know that Python has default parameters, so that when instantiating an object, we can selectively override some default parameters as needed to decide how to instantiate the object. When an object has multiple default parameters, this feature is very easy to use and can gracefully simplify the code.
Th ...
Posted by markyoung1984 on Tue, 11 Jan 2022 04:23:13 +0100
Spring source code analysis the fifth bullet - what other effects does God level spring have?
From the initial simple handwritten article to the current source code analysis article, the whole spring MVC has been completed. We can see that various callbacks, such as AOP and MVC, are processed through callbacks. This article will take a look at what other practical uses spring has besides being used as a framework.
First, let's take a l ...
Posted by heltr on Tue, 11 Jan 2022 03:50:03 +0100