
Your Guide to Design Patterns – Decorator Pattern
The Decorator Pattern is a structural pattern, also known as the Wrapper pattern. The Decorator Pattern is used to extend (decorate) the functionality of an individual object.
The Decorator Pattern is a structural pattern, also known as the Wrapper pattern. The Decorator Pattern is used to extend (decorate) the functionality of an individual object.
The Iterator Pattern is a behavioural design pattern. It provides a way for us to acces the elements of a collection, without needing to know anything about the internal implementation. We use this so much, that it has become a programming idiom rather than a design pattern.
The Abstract Factory pattern is a design pattern that we use to create families of related or dependent classes. It is like a factory of factories.
The Factory Method pattern is a design pattern that delegates the responsibility of object creation to helper subclasses. The factory method pattern defines an interface for creating an object, but leaves the choice of its type to the subclasses.
The Simple Factory pattern is a design pattern that is not included in the GoF book. It is the easiest factory pattern to understand, and arguably the most commonly used.
The null object design pattern is not included in the famous Gang of Four book. But it is a useful example of a good design pattern. The null object pattern defines a class that enables the processing of null values.
The template method pattern is a way to encapsulate algorithms. It uses inheritance to vary part of an algorithm. So we use the template method pattern when we need to support multiple variations of the same algorithm.
The Prototype pattern is a creational design pattern. It is used to specify the kind of objects to create using a prototypical instance. You can create new objects by copying the prototype.
The strategy pattern is a behavioural design pattern. The intent of the strategy pattern is to define a family of algorithms, encapsulate each one, and make them interchangeable. In this article we’ll look at some example code.
The Adapter pattern is a structural design pattern. The intent of the adapter pattern is to convert the interface of one class into that of another class. Adapters let classes work together that wouldn’t otherwise because of incompatible interfaces.
Stay home. Stay safe. Stay informed. Find information at www.sacoronavirus.co.za
Thank you for completing the form. We're excited that you have chosen to contact us about training. We will process the information as soon as we can, and we will do our best to contact you within 1 working day. (Please note that our offices are closed over weekends and public holidays.)
Our privacy policy ensures your data is safe: Incus Data does not sell or otherwise distribute email addresses. We will not divulge your personal information to anyone unless specifically authorised by you.
If you need any further information, please contact us on tel: (27) 12-666-2020 or email info@incusdata.com