Skip to main content

18 docs tagged with "https://github.com/ignatandrei/patterns"

View All Tags

AbstractFactory

Abstract Factory is a creational design pattern that lets you produce families of related objects without specifying their concrete classes.

Adapter

Adapter design pattern allows the interface of an existing class to be used as another interface.

Builder

The intent of the Builder design pattern is to separate the construction of a complex object from its representation.

Chain

Chain of responsibility pattern allows an object to send a command without knowing what object will receive and handle it.

Decorator

Decorator allows behavior to be added to an individual object, either statically or dynamically, without affecting the behavior of other objects from the same class.

Facade

Facade is is an object that provides a simplified interface to a larger body of code, such as a class library.

Factory

A factory is a function or method that returns objects of a varying prototype or class from some method call, which is assumed to be new.

Flyweight

Flyweight pattern is used to reduce the memory and resource usage for complex models containing a large number of similar objects.

IOC

Inversion of Control is a principle in software engineering by which the control of objects or portions of a program is transferred to a container or framework.

Iterator

Iterator design pattern allows to traverse a container and access the container's elements.

Lazy

Lazy initialization is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed.

NullObject

Instead of returning null , use an object which implements the expected interface, but whose method body is empty.

Observer

Observer pattern is a behavioral design pattern that defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.

Prototype

It is used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects.

Singleton

Singleton pattern restricts the instantiation of a class to one object.

Strategy

Strategy pattern allows a client to choose from a family of algorithms at runtime.

Visitor

Visitor pattern is a way of separating an algorithm from an object structure on which it operates.