imsavva.com

Folder icon

Tags / patterns

Observer pattern

showPostImage(-716380058)

Uncaught exception: the image is currently being shown in a museum

Observer is a software design pattern, that is used when some objects create events and other objects should be notified when these events occur. The main idea is that we have two types of instances: one that produces events and one that consumes them. Events producer must have three methods: addObserver(Observer…
Posted on
2016-06-19

Strategy pattern

showPostImage(868043779)

Uncaught exception: the image is currently being shown in a museum

With this post I'm starting series of articles dedicated to GoF design patterns. GoF stands for Gang of Four - four authors that wrote a famous book about design patterns. So the first pattern I want to describe is Strategy . It allows to choose the behaviour of instances at runtime by defining appropriate strategy…
Posted on
2016-06-12