Common design patterns

Create pattern 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 clas ...

Posted by ijmccoy on Thu, 21 Oct 2021 20:54:02 -0700

Prototype Pattern

πŸ€ The following content is synchronously posted on my personal blog https://www.lvjguo.top😊 1 Introduction Definition: specify the type of objects to be created with prototype instances, and create new objects by copying these prototypes. Features: do not need to know any creation details, do not call the constructor Type: create type Ap ...

Posted by Conjurer on Wed, 20 Oct 2021 18:30:23 -0700

Summary of knowledge points of interview questions of BAT large factory for Android post in 2021, and complete knowledge system

1, Picture 1,Picture library comparison 2,LRUCache principle 3,Picture loading principle 4,How to implement the picture library by yourself? 5,Glide Source code analysis 6,Glide What cache is used? 7,Glide How does the memory cache control its size? 2, Network and security mechanism 1.Network framework comparison and source code analysis ...

Posted by Jahren on Wed, 20 Oct 2021 10:45:32 -0700

Android startup - Application startup process

Based on Android 11-api30 Overview Obtain two binders, applicationThread and AMS 2. During attach, the obtained applicationThread object is also passed to the AMS process, requesting a remote call to inform the AMS Application process that it wants to create an Application. At this time, AMS is the serverAMS receives a message and requests to ...

Posted by Ambush Commander on Tue, 19 Oct 2021 13:12:48 -0700

Android processes and threads (understand > use > common interview questions)

πŸ”₯ concept πŸ’₯ process The basic unit of program operation. The basic unit of system resource allocation and scheduling. Has its own independent address space. Multiple processes can execute concurrently. Thread container πŸ’₯ thread The smallest unit of program execution. The basic unit of CPU scheduling and dispatch. There is ...

Posted by pinacoladaxb on Mon, 18 Oct 2021 14:59:13 -0700

Design pattern, policy pattern, c + + implementation

Strategic model, also known as policy model Definition: define a set of algorithms, encapsulate each algorithm and make them interchangeable. The algorithm mentioned here is a function; Encapsulation is to declare virtual functions with base classes, inherit and implement functions with Subclasses; Interchangeability means that the base class ...

Posted by Woolf on Sat, 16 Oct 2021 00:47:40 -0700

UML class diagram relationship and its corresponding code

0. Introduction This blog It's very well written. Most of it is reprinted from this blog in case of forgetting. At the same time, some content is added and expressed in C + +. It's all repeated wheels. It's shameless to mark it as original. Ref01. Generalization, implementation, association, aggregation, composition and dependency in UMLR ...

Posted by hhawkins on Fri, 15 Oct 2021 12:55:50 -0700

IntentService for Android multithreading

####What is IntentService? IntentService inherits from Service, so IntentService is also one of the four major components. IntentService encapsulates the HandlerThread thread thread (only one thread) to process asynchronous tasks in sequence. Start IntentService through startService(Intent) and transmit asynchronous tasks through Intent. When ...

Posted by dotti on Fri, 15 Oct 2021 12:45:38 -0700

Develop an Android RTMP player from scratch

1. Background introduction When mobile live broadcasting applications became popular in the past 15 years, the main live broadcasting protocol was RTMP. The multimedia services were Adobe's AMS, wowza, Red5, crtmpserver, nginx rtmp module, etc., and the RTMP service SRS became popular. The Android player mainly started playing HLS with EXOPlay ...

Posted by PBD817 on Tue, 12 Oct 2021 18:40:28 -0700

Dimitri's law of software design principles

catalogue 1, Definition of Demeter's law 2, The meaning of Dimitri's law 3, Summary 1, Definition of Demeter's law Dimitri's law, also known as the principle of least knowledge, although its name is different, it describes the same rule: an object should have the least understanding of other objects. Generally speaking, a class should kno ...

Posted by amir on Tue, 12 Oct 2021 11:15:53 -0700