Abstract factory pattern

I. Introduction of models The factory method mode considers the production of a kind of products, such as TV factory only produces TV, pizza shop only produces pizza, etc. Similar products are called the same grade, that is to say: the factory method mode only considers the production of products of the same grade, but in real life, many fact ...

Posted by pauls74462 on Thu, 10 Feb 2022 15:18:15 +0100

Analysis on the process of pulling up the soft keyboard in Android WebView

preface This article is flutter_ hybird_ Practice and technology sharing of WebView cross process rendering One of the research notes in the development process. If there are errors, please point them out. Source code analysis First, let's take a general look at the inheritance structure of webview: public class WebView extends MockView { ...

Posted by hubardz on Thu, 10 Feb 2022 15:07:21 +0100

Service startup process -- Based on Android 11

Service startup process -- Based on Android 11 Recently, when reviewing the relevant knowledge points of Android system, we all know that Android has four components: Activity, Service, Broadcast Receive and Content Provider. Compared with other knowledge points, the best way to review the four components is to follow the source code again. Wh ...

Posted by dionsweet on Thu, 10 Feb 2022 13:32:37 +0100

[easily understand design mode] observer mode

[design mode] observer modeprefaceThe definition of Observer mode: it refers to the one to many dependency between multiple objects. When the state of an object changes, all objects that depend on it are notified and automatically updated. This mode is sometimes called publish subscribe mode and model view mode. It is an object behavior mode.Ob ...

Posted by holowugz on Thu, 10 Feb 2022 09:46:05 +0100

Charm of design pattern I

Some thoughts on learning design patterns for the first time At present, I am reading the book "Dahua design pattern", which is cheap and easy to understand. The steps are in place That is to find that you can really improve the logic of your code, feel the convenience brought by design patterns, and understand why and what are ...

Posted by JonathanAnon on Thu, 10 Feb 2022 08:28:49 +0100

CountDownLatch thread synchronization for Java Concurrent Programming learning

preface Scene description Briefly describe this step. Open three threads and call three different methods. Use the countdowncatch counter to wait for the completion of all three methods, and then merge the data Basic concepts introduce CountDownLatch is a synchronization tool class that allows one or more threads to wait until other t ...

Posted by davidjwest on Thu, 10 Feb 2022 08:00:51 +0100

Responsibility chain mode (responsibility chain mode)

  1. OA system procurement approval requirements Procurement approval project of school OA system (procurement of teaching equipment by purchasers): the demand is 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 appr ...

Posted by navinj on Thu, 10 Feb 2022 02:48:04 +0100

Deep understanding of Java enumeration mechanism

Before reading this article, you need to understand how to define enumeration and its simple use enumeration 1, How the JVM handles enumerations A simple enumeration class public enum Fruit{ APPLE(67),ORANGE(68),BANANA(69); int code; Fruit(int code){ this.code=code; } } Decompile fruit. Using the Jad command C ...

Posted by rjs on Thu, 10 Feb 2022 00:41:37 +0100

Decorator mode of design mode

Decorator mode preface I am a junior undergraduate majoring in software engineering. At present, we are preparing for internship and autumn recruitment. The intended position is java back-end development engineer. To this end, I hosted a project in codecloud to sort out all my knowledge. Contents involved: computer network, operating system, ...

Posted by jack_ on Wed, 09 Feb 2022 20:07:32 +0100

Design mode - singleton mode

Singleton mode 1. Overview of singleton mode For some classes of a software system, only one instance is very important. For example, a system can only have one window manager or file system, only one timing tool, etc. How to ensure that a class has only one instance and that the instance is easy to access? Defining a unified global variable ...

Posted by mickro on Wed, 09 Feb 2022 17:57:53 +0100