Builder pattern of design pattern

I significance Separate the construction of a complex object from its representation, so that the same construction process can create different representations. Note: for the construction of complex objects, for example, if an object has dozens of member attributes, it will be very troublesome when we create this object and assign values to th ...

Posted by mgason on Sat, 02 Apr 2022 22:07:59 +0300

Design pattern learning note sharing meta model and its application

Flyweight mode: as the name suggests, it is a shared unit. The intention is to reuse objects, save memory and improve the access efficiency of the system. For example, the background flowers, grass, trees and other objects in the red and white Adventure Island game can actually be reused and shared by different scenes for many times, which is w ...

Posted by jfourman on Sat, 02 Apr 2022 18:53:48 +0300

This article explains the past and present life of Android lightweight storage scheme in detail

Storage scheme is a very important module in Android development. Here is a big man's past and present life of Android lightweight storage scheme. I hope it will be helpful to your study and work. Original address: https://juejin.cn/post/6934494768185475079 background For Android lightweight storage solutions, there are shared preferences ...

Posted by maGGot_H on Sat, 02 Apr 2022 00:12:26 +0300

Design mode-05-prototype mode

1, Prototype mode Prototype Pattern is used to create duplicate objects while ensuring performance. This type of design pattern is a creation pattern, which provides the best way to create objects. (simply put: use an instance that has been created as a prototype, and create a new object that is the same as the prototype object by copying the ...

Posted by kbc1 on Fri, 01 Apr 2022 19:49:14 +0300

Design mode - 8 single case modes

Mengxin design mode - 8 single case modes reference material: https://www.bilibili.com/video/BV1G4411c7N4?p=1 Shang Silicon Valley Han Shunping's design model If most of the teachers have mistakes, please pick up your own notes Reference: there are many repeated chapters on the Internet. I forgot to refer to the articles of several bloggers ...

Posted by Nicoza on Fri, 01 Apr 2022 16:39:46 +0300

Decorator mode

Decorator mode Decorator Pattern allows you to add new functionality to an existing object without changing its structure. This type of design pattern belongs to structural pattern, which is a wrapper for existing classes. This pattern creates a decoration class to wrap the original class, and provides additional functions on the premise of m ...

Posted by lettheflamesbegin on Fri, 01 Apr 2022 08:05:02 +0300

Design pattern - builder pattern and its application

In system development, there is often the need to create a complex object. This complex object is composed of several sub parts. For example, we now need to assemble a computer, which is composed of CPU, motherboard, hard disk, memory, display, mouse, keyboard... And choose computers with different configurations according to our real use scena ...

Posted by srikanth03565 on Fri, 01 Apr 2022 06:07:45 +0300

Hongmeng open source third-party component -- VideoCache video cache component

catalog: 1. Component rendering display 2. Sample parsing 3. Library parsing 4. Collection of articles on Hongmeng open source third party components preface Video cache component based on Android platform( https://github.com/danikula/Android VideoCache ), the migration and reconstruction of hongmenghua has been realized, and the code has ...

Posted by louisA2A on Thu, 31 Mar 2022 03:17:01 +0300

Adapter mode

1, Adapter mode Adapter patterns are divided into class structured patterns and object structured patterns. The former has a higher degree of coupling between classes than the latter, and requires programmers to understand the internal structure of relevant components in the existing component library, so there are relatively few applicati ...

Posted by nwoeddie23 on Wed, 30 Mar 2022 21:18:44 +0300

Design pattern abstract factory pattern

Abstract factory pattern The two design modes we saw before have their own defects. In the simple factory mode, a factory produces multiple products and creates corresponding product instances according to the product names provided by customers; In the factory method design mode, many factory classes are created in the factory in the simple f ...

Posted by oskom on Wed, 30 Mar 2022 19:25:05 +0300