As software designers and developers, we can often run into errors and issues during our development process. Design patterns however, provide a general reusable solution for the common problems that occur in software design. These patterns are known to typically show relationships between classes or objects. The overall idea is to speed up the development process by providing well tested, proven development/design paradigms. We can even use patterns in our own designs as it will only make our design more flexible, more resilient to change, and even easier to maintain. There are multiple different types of patterns that are extremely well known to designers and developers across the globe. These patterns are categorized into three different types, Creational, Structural, and Behavioral.
The Creational design patterns are all about object creation or class instantiation. The benefit of creational design patterns is that they enable a design to become more flexible and applying a creational pattern removes hard coded behavior or can move it into a higher level interface. Class creation uses inheritance in the instantiation process and defers creation to subclasses. Object creation uses delegation in the instantiation process and defers some of the creation to other objects. Some of the most common creational design patterns include the Factory Method, Abstract Factory, Builder, Prototype, and Singleton. Structural design patterns are a little different from the creational patterns, but they allow us to create large, flexible, and efficient structures. This pattern eases the design process by identifying a simple way to realize relationships. Some common types of Structural patterns may include, Adapter, Bridge, Composite, Flyweight, Proxy, and many more. More than often this design pattern will result in some form of abstraction and inheritance between two objects. Lastly, Behavioral design patterns is a pattern that strictly defines communication between objects, as well as classes. This pattern is solely for the purpose of increasing the flexibility of communication. There are many behavioral design patterns but some may include, Command, Iterator, Meditator, Memento, Observer, Strategy, and many more.
Design patterns are extremely useful and important to learn about as they can help accelerate the development process and help save time without needing to reinvent a new pattern every time a problem arises. They can especially be useful when you’re at the beginning of your journey as design patterns are a good starting point. Even if you won’t use them right away in your first projects, getting to know them will help you understand the existing solutions you’re using. The simplest and most complex solutions are all made up of different patterns.
https://jtearl188.medium.com/the-3-types-of-design-patterns-6138e353715b
From the blog CS@Worcester – Conner Moniz Blog by connermoniz1 and used with permission of the author. All other rights reserved by the author.