[Mybatis source code analysis] summary of design patterns involved in Mybatis source code

Although we all know that there are 26 design patterns, most of them stay at the conceptual level and are rarely encountered in real development. A large number of design patterns are used in Mybatis source code. Reading the source code and observing the application of design patterns in it can have a deeper understanding of design patterns. My ...

Added by AliceG on Mon, 07 Feb 2022 11:39:13 +0200

Observer mode of design mode

Observer pattern: defines a one to many dependency between objects, so that whenever the state of an object changes, its related dependent objects are notified and automatically updated. Aliases for observer mode include Publish/Subscribe mode, Model/View mode, Source/Listener mode, or Dependents mode. Problem solved: one to one or one to many ...

Added by sarika on Mon, 07 Feb 2022 09:52:29 +0200

Design mode - builder mode

preface This article refers to dark horse's design pattern handout and c language Chinese network tutorial C language Chinese network tutorial , rookie tutorial: Rookie tutorial . There are also some of their own understanding. It is still difficult to summarize a set of concepts by themselves. Dark horse video: Dark horse design patte ...

Added by diesel_heart on Sun, 06 Feb 2022 07:35:55 +0200

Effective-C 2.0 - Protocol and classification

There is a feature in OC language called protocol. Because OC does not support multiple inheritance, we define a series of methods that a class should implement in the protocol. The protocol can well describe the interface. **Category * * is also an important feature of OC. Using classification, you can directly add methods to the current clas ...

Added by lowspeed on Sun, 06 Feb 2022 06:26:16 +0200

Twenty three design patterns of JAVA: Chain of Responsibility Pattern

Chain of Responsibility Pattern concept As the name suggests, 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 co ...

Added by Hybride on Sun, 06 Feb 2022 06:17:42 +0200

Seven principles of design pattern -- Richter's replacement principle

1. What is the Richter substitution principle? As we all know, there are three characteristics (encapsulation, inheritance and polymorphism) in object-oriented programming. Here, let's inherit this thing. Inheritance contains such a layer of meaning: all implemented methods in the parent class are actually setting specifications and contr ...

Added by mudkicker on Sun, 06 Feb 2022 04:58:57 +0200

Intermediary model

Intermediary model Basic introduction Mediator Pattern, which encapsulates a series of object interactions with a mediation object. Mediators make objects do not need to explicitly refer to each other, so that they are loosely coupled, and their interaction can be changed independentlyThe mediator pattern is a behavioral pattern, which makes ...

Added by D_tunisia on Fri, 04 Feb 2022 12:49:12 +0200

Flutter - Fundamentals Chapter 2

Introduction to Flutter catalog 1, Introduction to directory structure 2, Fluent entry file and entry method // main.dart void main(){ runApp(MyApp()); } // It can also be abbreviated void main() => runApp(MyApp()); /*There is a main in the lib directory of each fluent project Dart is the entry file of fluent The main method is t ...

Added by newburcj on Thu, 03 Feb 2022 15:49:05 +0200

Bridging mode of design mode

1. Introduction to bridging mode Bridging mode Bridging is used to decouple abstraction from realization, so that they can change independently. This type of design pattern belongs to structural pattern, which realizes the decoupling of abstraction and realization by providing a bridge structure between them.The implementation of this inte ...

Added by carsonk on Thu, 03 Feb 2022 08:49:14 +0200

Daily design mode - adapter mode

definition Adapter Pattern is a bridge between two incompatible interfaces. This design pattern belongs to structural mode, which combines the functions of two independent interfaces. Converting the interface of a class into another interface desired by the customer is what the adapter needs to do. The adapter mode enables those classes th ...

Added by bampot on Wed, 02 Feb 2022 15:19:10 +0200