Category: Behavioral

Memento Design Pattern in Visual Basic .NET

Definition Without violating encapsulation, capture and externalize an object’s internal state so that the object can be restored to this state later. This pattern is used to save the internal state of an object when it changesĀ  state of over the time. You can use save points when you save the state so that you […]

Read more

Interpreter Design Pattern in Visual Basic .NET

Definition Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language. This is about creating interpreter for a language which can be new language or existing one. To use the Interpreter Design Pattern effectively one should have good knowledge about computer language […]

Read more

Command Design Pattern in Visual Basic .NET

Read more

Chain of Responsibility Pattern in Visual Basic .NET

Read more

Visitor Design Pattern in Visual Basic .NET

Read more

Template Design Pattern in Visual Basic .NET

Definition Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm’s structure. I will explain this design pattern with an example later This is the UML diagram for Template Design Pattern Participant AbstractClass This abstract class define […]

Read more

Strategy Design Pattern in Visual Basic .NET

Definition Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from the clients that use it In this pattern you have several algorithms to do a task. Depending on your requirement you can select the algorithm dynamically. You can implement each algorithm in separate class This […]

Read more

State Design Pattern in Visual Basic .NET

Definition The State Design Pattern allows an object to alter its behavior when its internal state changes. The object will appear to change its class. State Design Pattern is one of the Behavioral Design Patterns. Some objects may have several states in its life cycle, and also it has different behavior depending on the state […]

Read more

Observer Design Pattern in Visual Basic .NET

Observer design pattern is one of the behavior design patterns. This pattern can be identified as publisher – subscriber model. This pattern defines one to many relationship between objects. When oneobjectsx change its states, all the defendent objects are notified automatically. That is why we name this as publisher-subscriber model. There are main objects in […]

Read more