Design mode - singleton mode
Concept: ensure that there is only one instance of a class and provide a global access point to access this unique instance
ps: Singleton mode is an object creation mode. Singleton mode has three main points: first, a class can only have one singleton, second, it must create this instance by itself, and third, it must provide this instance ...
Posted by sinisake on Wed, 09 Feb 2022 17:20:09 +0100
Strategic mode of design mode
Strategy mode
1. Basic introduction
The strategy pattern defines the algorithm family and encapsulates them separately so that they can replace each other. This pattern makes the change of the algorithm independent of the customers using the algorithm.This model embodies several design principles:
Opening and closing principle: separat ...
Posted by pozer69 on Wed, 09 Feb 2022 14:33:58 +0100
Implementation of singleton mode
1, What is singleton mode
Singleton Pattern is one of the simplest design patterns in Java. This type of design pattern is a creation pattern, which provides the best way to create objects.
This pattern involves a single class that is responsible for creating its own objects while ensuring that only a single object is created. This class prov ...
Posted by bigphpn00b on Wed, 09 Feb 2022 07:54:21 +0100
6. Spring Static and Dynamic Agent Modes
(The article notes come from the b-station video, meets the mad saying, carries the notes as learning, for your reference to study together)
Static/dynamic proxy mode
proxy pattern
Why learn proxy mode, because the underlying mechanism of AOP is dynamic proxy!
Agent mode:
Static ProxyDynamic Proxy
Before learning aop, learn about proxy mo ...
Posted by jacomus on Tue, 08 Feb 2022 18:50:27 +0100
Enumeration class - it's really not that simple to use enumeration well!
Watch first and then praise, and form a habit. Praise collection, brilliant life.
preface
The enum keyword, introduced in Java 5, represents a special type of class that always inherits Java Lang. enum class is special because it is a class type, but it has some special constraints more than class types
1, Overview
In this artic ...
Posted by ashrust on Tue, 08 Feb 2022 16:50:26 +0100
Android Gaode map developed by fluent plug-in
Develop an Android Gaode map plug-in from scratch
preface
After reading many blog posts, I found that there is little mention about how to use the mixed editing and interaction of Android and Dart in actual combat. In the actual project, fluent still needs to make a lot of use of some native functions, such as camera, map, accessing device, l ...
Posted by PrObLeM on Tue, 08 Feb 2022 15:54:43 +0100
Topic subscription message push enables users to no longer miss important information
Nowadays, there are more and more smart terminal apps, and the amount of information pushed by each App is expanding rapidly. How to make the information pushed by yourself accurately catch the sight of users and occupy a high ground in the market competition? One answer is topic subscription message push.
The topic subscription message push c ...
Posted by k3Bobos on Tue, 08 Feb 2022 04:49:13 +0100
Mode 13: Template method mode and its application in JDK and Tomcat
[Introduction]
We are used to taking exams. Have you ever thought about the benefits of printing test papers on a machine? Of course, it's certainly faster than handwriting first; However, the key is not to make mistakes, because everyone should have the same topics. This is the design mode of a store - the template method mode.
Template meth ...
Posted by duclet on Mon, 07 Feb 2022 18:45:21 +0100
Android:Android messaging mechanism collation
Preface
Organize Android messaging mechanisms to help you comb the content of Android messaging mechanisms
I. Composition of Android Message Mechanism
The Android messaging mechanism is actually the operating mechanism of Handler(). We often use Handler() to interact with other tasks during the development process, such as opening a su ...
Posted by Pino on Mon, 07 Feb 2022 18:28:35 +0100
[design mode] Bridge mode
Bridge mode
motivation
Due to the inherent implementation logic of some types, they have two changing dimensions, and even multiple latitude changes.How to deal with this "multi-dimensional change"? How to use object-oriented technology to make types change easily in two or more directions without introducing additional complexity? ...
Posted by Stille on Mon, 07 Feb 2022 13:53:24 +0100