Talk about the Callback of collaborative process and write the model of collaborative process
The emergence of Coroutines has subverted the programming style of Java for many years. If you are the author of a third-party library, you may want to use Coroutines and Flow to make your Java callback based library more Kotlin and collaborative. On the other hand, if you are an API consumer, you may prefer to access the Coroutines style API t ...
Posted by jeff_papciak on Thu, 04 Nov 2021 14:41:06 -0700
☕ [Java technical guide] "serialization series" delves into the characteristics and principles of FST's sharp tools for fast serialization and compression of memory
Concept and definition of FST
The full name of FST serialization is Fast Serialization Tool, which is an alternative implementation of Java serialization. Since the two serious shortcomings of Java serialization mentioned above have been greatly improved in FST, the characteristics of FST are as follows:
The serialization provided by JDK i ...
Posted by franklyn on Thu, 04 Nov 2021 05:22:46 -0700
Factory Mode--The Evolution of Cat Grain Plant
The Birth of Cat Food Company
Gyroscope is a program. It started its own company. In order to commemorate the years when dream was born, the company named "Running Yard" and its main business is cat food production.
A Miao that takes R&D and operations into account is not a long-term solution. So I hired a vegetable mew to be an ...
Posted by Joshua4550 on Wed, 03 Nov 2021 09:16:38 -0700
Some common code specifications
Summary of some common code specifications
preface
name
1. Named length selection
2. Simplify naming with context
3. Naming should be readable and searchable
4. How to name an interface
notes
1. What should I write
2. Are the more comments the better
Code style
1. How big is the function
2. How long is the most appropriate line of code ...
Posted by Donovan on Tue, 02 Nov 2021 21:53:23 -0700
Responsibility chain model
1, Introduction to responsibility chain model
1.1 definitions
The Chain of Responsibility Pattern creates a chain of receiver objects for requests. This mode gives the type of request and decouples the sender and receiver of the request. This type of design pattern belongs to behavioral pattern.In this pattern, each recipient usually c ...
Posted by anauj0101 on Tue, 02 Nov 2021 10:35:42 -0700
[design mode: single case mode] single case mode 02: lazy mode
Singleton mode 02: lazy mode
Text start@Assassin
1. Review the hungry Han model:
Briefly review the hungry man mode in a single case mode~ I'm hungry man mode!
The so-called hungry man mode means that as long as the class is loaded, the object gf will be created. Even if GF is not used, it will be created. This is the loading mechanism ...
Posted by Coldman on Tue, 02 Nov 2021 03:08:05 -0700
I was fired the next day because I changed int to Integer
This article is excerpted from the Flyweight Pattern of "design patterns should be learned in this way"1 story backgroundBecause a programmer changed a method parameter in the production environment and changed the int type to Integer type, because money was involved, the company suffered heavy losses and the programmer was dismissed. ...
Posted by AStrangerWCandy on Mon, 01 Nov 2021 22:36:23 -0700
Because I changed int to Integer, I was dismissed the next day
This article is excerpted from the Flyweight Pattern of "design patterns should be learned in this way"
1 story background
Because a programmer changed a method parameter in the production environment and changed the int type to Integer type, because money was involved, the company suffered heavy losses and the programmer was dism ...
Posted by foxy69 on Mon, 01 Nov 2021 18:55:16 -0700
Design pattern - abstract factory pattern
Design pattern - abstract factory pattern
meet Simple factory mode,Factory method model
In the factory method mode in the previous chapter, a factory only produces one product, which has good scalability, but in reality, factories are diversified. A factory can create a series of products. At this time, the factory method mode is not applicab ...
Posted by alan543 on Mon, 01 Nov 2021 03:46:57 -0700
Design pattern simple factory Abstract Factory
1 simple factory mode
1.1 definitions
Simple factory mode is also called static factory mode, but it does not belong to one of the 23 design modes.
Simply put, there is a class that provides a creation method createProduct to determine which class to instantiate according to the received value, but the classes that can be instantiated by this ...
Posted by scottd on Sun, 31 Oct 2021 09:14:48 -0700