随笔分类 - 设计模式
摘要:1.简介 The command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or trigg
阅读全文
摘要:1.简介 The builder pattern is a design pattern designed to provide a flexible solution to various object creation problems in object oriented programmin
阅读全文
摘要:1.简介 In computer programming, the strategy pattern (also known as the policy pattern) is a behavioral software design pattern that enables selecting a
阅读全文
摘要:1.简介: in the book Design Patterns. The template method is a method in a superclass, usually an abstract superclass, and defines the skeleton of an ope
阅读全文
摘要:1.什么是装饰器模式 装饰器模式(Decorator Pattern)允许向一个现有的对象添加新的功能,同时又不改变其结构。这种类型的设计模式属于结构型模式,它是作为现有的类的一个包装。 这种模式创建了一个装饰类,用来包装原有的类,并在保持类方法签名完整性的前提下,提供了额外的功能。 2、装
阅读全文
摘要:1.工厂模式简介 In class based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating
阅读全文
摘要:1.什么是代理 In "computer programming" , the proxy pattern is a "software design pattern" . A proxy , in its most general form, is a class functioning as a
阅读全文
摘要:1.基本介绍 单例模式(Singleton Pattern)是 Java 中最简单的设计模式之一。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。 这种模式涉及到一个单一的类,该类负责创建自己的对象,同时确保只有单个对象被创建。这个类提供了一种访问其唯一的对象的方式,可以直接访问,
阅读全文
摘要:一、基本介绍 观察者模式是一种对象行为模式。它定义对象间的一种一对多的依赖关系,当一个对象的状态发生改变时,所有依赖于它的对象都得到通知并被自动更新。在观察者模式中,主题是通知的发布者,它发出通知时并不需要知道谁是它的观察者,可以有任意数目的观察者订阅并接收通知。观察者模式不仅被广泛应用于软件界
阅读全文

浙公网安备 33010602011771号