Design pattern - responsibility chain pattern
Procurement approval project requirements of school OA system
Purchaser purchases teaching equipment
If the amount is less than or equal to 5000, it shall be approved by the teaching Director (0 < = x < = 5000)If the amount is less than or equal to 10000, it shall be approved by the president (5000 < x < = 10000)If the amount ...
Added by zildjohn01 on Sat, 15 Jan 2022 02:03:20 +0200
[design mode] structural mode - bridge pattern
preface
I suggest reading this article first [design mode] 7 principles of software design and 23 design modes (I)
Concept of aggregation and combination
See this article for details. It's written in great detail Summary of relationship meaning represented by UML class diagram and various lines
I Bridging mode
Bridge Pattern, also ...
Added by Ali25m on Fri, 14 Jan 2022 20:43:05 +0200
Java design pattern - composite pattern
Combination mode
Business requirements
The school displays the structure of colleges and departments. A school has multiple colleges and a college has multiple departments;Traditional thinking, the Department inherits the college, and the college inherits the school;
problem analysis
The college is regarded as a subclass of the school, and ...
Added by schoi on Fri, 14 Jan 2022 06:33:44 +0200
Create singleton mode
Singleton pattern: ensure that a class has only one instance and provide a global access point to access it.
Singleton mode
1: What is a singleton
My understanding: during the running of the program, only one instance is constructed, and all users share and use the instance.
Singleton pattern: ensure that a class has only one instance and p ...
Added by chuckjones on Fri, 14 Jan 2022 05:51:22 +0200
Behavioral iterator pattern
The function of iterator: traverse a collection of the same elements.
The iterator pattern is a behavioral design pattern.
The idea of iterator: traverse the values of the elements in the collection in some way without changing the underlying elements.
Implementation of iterator:
1: premise: a collection element class, a collection class, a ...
Added by devx on Fri, 14 Jan 2022 00:16:18 +0200
C language and design pattern - strategy pattern
Strategy mode
"Sun Quan saw Liu Bei's ambition to rise up and kill him. It would make people all over the world despise him. He wanted to beat him. What could he do? Sun Quan had a sister, sun Shangxiang, who was going to recruit Liu Bei as a son-in-law, and then Sun Quan tried to put Liu Bei under house arrest. Sun Quan's idea was stil ...
Added by senyo on Thu, 13 Jan 2022 22:20:56 +0200
Three [pile insertion] techniques for tracking the call of [library function] in Linux
Author: Daoge, a 10 + year embedded development veteran, focusing on: C/C + +, embedded and Linux.
Pay attention to the official account below, reply to books, get classic books in Linux and embedded field. Reply to [PDF] to obtain all original articles (PDF format).
catalogue
Other people's experience, our ladder!
What is pile insertion? ...
Added by dlkinsey85 on Wed, 12 Jan 2022 22:11:29 +0200
Design pattern - prototype pattern (deep copy and shallow copy)
Prototype pattern of design pattern
1. Overview of prototype mode
Prototype pattern is used to create duplicate objects while ensuring performance. It belongs to the creation mode, which provides the best way to create objects.
The prototype pattern is relatively simple to implement in Java. You only need to implement an interface clonable a ...
Added by k0z on Wed, 12 Jan 2022 05:05:11 +0200
The ultimate means of Android package volume optimization
preface
There is no need to say more about the importance of package size. Package size directly affects users' downloading, retention, and even some manufacturers' pre installed mandatory requirements must be less than a certain value. However, with the iterative development of the business, the application will become larger and larger, a ...
Added by fri on Tue, 11 Jan 2022 16:30:21 +0200
Dahua design pattern - Embedded
The embedded environment is generally low configuration, partial to hardware, the bottom layer, tight resources, the code is mainly C language and assembly, and the code application logic is simple. But with the advent of the AIOT era, the situation has changed. The performance resources of the chip are gradually improved, and the business logi ...
Added by dv90 on Tue, 11 Jan 2022 12:15:03 +0200