Design mode - singleton mode
brief introduction
The class of a singleton object can only allow one instance to exist.
Many times, the whole system only needs to have a global object, which is conducive to coordinating the overall behavior of the system. For example, in a server program, the configuration information of the server is stored in a file. These configurat ...
Posted by feddie1984 on Thu, 02 Sep 2021 14:16:36 -0700
Android advanced - Binder of Android cross process communication mechanism, successfully joined Tencent
Through system call, user space can access kernel space. How does it access kernel space? The dynamic loadable kernel module mechanism of Linux solves this problem. The module is a program with independent functions. It can be compiled separately, but it can not run independently. In this way, the Android system can complete the communication b ...
Posted by Lillefix on Thu, 02 Sep 2021 00:14:46 -0700
Architecture e e-commerce APP Componentization Exploration, Shock
When isModuleRun is false, both Application and AndroidManifest participate in the compilation as Libraries, which do not require Activation to be started and custom Applications to be inverted.
isModuleRun=false
Unordered modification
<application
android:allowBackup="true"
android:supportsRtl="true"
android:theme="@style/App ...
Posted by Mark on Wed, 01 Sep 2021 20:45:55 -0700
[learning notes] factory mode
0 design mode
If you don't know about design patterns, you can first understand what design patterns are through this article
https://blog.csdn.net/qq_42874315/article/details/120006447?spm=1001.2014.3001.5502
1 factory mode
The creative design mode is mainly used to create objects. It replaces us to complete the operation of new object ...
Posted by jaykappy on Wed, 01 Sep 2021 20:28:50 -0700
Android source code - an article takes you to understand OkHttp. It's too complete
if (retryAndFollowUpInterceptor.isCanceled()) {
signalledCallback = true;
responseCallback.onFailure(RealCall.this, new IOException("Canceled"));
} else {
signalledCallback = true;
responseCallback.onResponse(RealCall.this, response);
}
} catch (IOException e) {
if (signalledCallback) {
// Do not ...
Posted by rfigley on Wed, 01 Sep 2021 18:07:57 -0700
Design pattern (007) -- seven design principles (Demeter's law)
catalogue
1: Demeter principle
1. Basic introduction
2: Application examples
3: Application example improvement
4: Precautions and details of Dimitri's law
1: Demeter principle
(according to Demeter's law, we should avoid the coupling of indirect friends in classes, so as to reduce the coupling between classes)
1. Basic introduc ...
Posted by McInfo on Wed, 01 Sep 2021 18:00:53 -0700