Follow the Pattern

31 Aug 2018

Standard Procedure

When given a commonly occurring problem in software design, there is usually a general solution or template to the problem know as a design pattern. The purpose of design patterns is to speed up the development process by proven development models. In order to use design patterns, one must first understand the problem in order to use the best design pattern for that problem. It is important to understand the problem and use the best design pattern because design patterns have trade-offs. Overall, a design pattern is a template which can be used in many situations. It describes reoccurring problems and then describes the solution to that problem.

Design Patterns in Action

A design pattern which I have had experienced in is the Observer design pattern. When a set of objects needed to be informed when a change in state occurs to another object, I used event handlers. Another design pattern I have had experienced in is the prototype design pattern. In a few of my projects, I had sets of classes in the API directory which were used to encapsulate underlying Mongo collections. In the same projects, I also implemented the publish-subscribe design pattern which made it easy for data flow and communication. Overall, designs patterns are fundamental for project development.