In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are the methods of design pattern shorthand". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. let's study and learn "what are the methods of design pattern shorthand"?
Factory method pattern (Factory Method): defines an interface for creating objects, but it is up to the subclass to decide which class needs to be instantiated. The factory method delays the process of subclass instantiation
Shorthand keywords: dynamic production object
Abstract factory pattern (Abstract Factory): provides an interface to create a series of related or interdependent objects without specifying their concrete classes
Shorthand keywords: produce into a series of objects
Builder pattern (Builder): separates the representation of a complex class from its construction, so that the same construction process can produce different representations
Shorthand keywords: complex object construction
Prototype pattern (Prototype): specify the type of object to be created with a prototype instance, and create a new object by copying the prototype
Shorthand keywords: clone object
Singleton pattern (Singleton): ensures that there is only one instance of a class and provides a global access point to it
Shorthand keywords: single instance
Adapter pattern (Adapter): converts the interface of one class into another interface that the user wants. It enables previously incompatible interfaces to work together.
Shorthand keywords: conversion interface
Bridge pattern (Bridge): separates the abstract part of a class from its implementation so that they can change independently
Shorthand keywords: inheritance tree split
Combination pattern (Composite): combines objects into a tree structure to represent a "whole-part" hierarchy, making users consistent in their use of individual and combined objects
Shorthand keywords: tree directory structure
Decoration pattern (Decorator): dynamically adds some additional responsibilities to an object. It provides a flexible alternative to extending functionality with subclasses, which is more flexible than deriving a subclass.
Shorthand keywords: dynamic additional responsibilities
Appearance pattern (Facade): defines a high-level interface that provides a consistent appearance for a set of interfaces in the subsystem, thus simplifying the use of the subsystem
Shorthand key words: unified external interface
Shared meta pattern (Flyweight): provides an effective way to support the sharing of a large number of fine-grained objects
Shorthand keywords: Chinese character coding
Proxy pattern (Proxy)-structural: provides a proxy for other objects to control access to this object
Shorthand keywords: shortcuts
Chain of responsibility pattern (Chain of Responsibility): reduces the coupling between the sender and receiver of the request by giving multiple objects the opportunity to process the request. Link the receiving object and pass the request in the chain until an object processes the request
Shorthand key words: transfer responsibility
Command mode (Command): encapsulates a request as an object so that customers can be parameterized with different requests, queue requests or log requests, and support undoable operations
Shorthand keywords: logging, revocable
Interpreter pattern (Interpreter): given a language, define its grammatical representation and define an interpreter that is used to interpret sentences in the language according to the grammatical representation.
Shorthand keywords: the mechanism of virtual machines
Iterator pattern (Iterator): provides a way to access elements in an aggregated object sequentially without exposing the internal representation of the object
Shorthand keywords: dataset
Intermediary pattern (Mediator)-Behavioral: a mediation object is used to encapsulate a series of object interactions. It eliminates the need for objects to explicitly call each other, thus achieving low coupling, and can change the interaction between objects independently.
Shorthand keywords: not directly quoted
Memo mode (Memento): captures the internal state of an object and saves it outside the object without breaking the encapsulation, so that the object can be restored to its previously saved state later
Shorthand keywords: game archive
Observer pattern (Observer): defines an one-to-many dependency between objects. When an object's state changes, all objects that depend on it are notified and updated automatically.
Shorthand key words: linkage
State mode (State): allows an object to change its behavior when its internal state changes
Shorthand keywords: state becomes class
Policy pattern (Strategy): define a series of algorithms, encapsulate them one by one, and make them interchangeable so that the algorithm can be changed independently of the users who use it.
Shorthand keywords: multi-scheme switching
Template method pattern (Template Method): define an algorithm skeleton in an operation, and defer some steps to a subclass, so that the subclass can redefine certain steps of the algorithm without changing the structure of an algorithm.
Shorthand keywords: frame
Visitor pattern (Visitor): represents an operation that acts on elements in an object structure so that new operations that act on those elements are defined without changing the classes of those elements.
Shorthand keywords: separation of data and operation
Thank you for your reading. the above is the content of "what are the methods of shorthand of design patterns". After the study of this article, I believe you have a deeper understanding of the methods of shorthand of design patterns. the specific use of the situation also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.