Like everything in life, to every problem there is a solution. Always an answer to a problem now how to get that answer is the actual effort. Feeling discouraged because you ran into a problem well break it down and see how it could be possibly solved/resolved. In computer science specifically in the software field we sometimes run into a problem even before we get into coding it. We need to design a solution and carefully look and observe where we can pick up the problem but again not in the code.That is why we have design patterns that are very important and helpful before things start rolling and before it’s too late.
In class we always talk about resolving issues and understanding mistakes as well as how we can avoid them prior. Design Patterns is a really useful and helpful topic that we learned. That being said I was confusing myself on the types of Design Patterns there were. Such as the creational, structural, and behavioral. Most articles that you would run into were not really helpful and just didn’t really help. There was one page that not only helped me but also displayed and explained how all of them work and more.
This page started it off with what Design Patterns which are designed solutions made for more certain repetitive and annoying problems software engineers may run into. Out of the staggering 26 patterns currently out there these three are grouped into: creational, structural, and behavioral. Top in the list was Creational Patterns. These patterns are mostly used in class instances such as object/class-creation. You see, Creational Patterns are actually many patterns such as Singleton which uses getInstance(), Eager Beaver, Lazy Days and many more. Throughout these patterns there are diagrams that show how they work and as well may allow you to practice. Moving onto Structural Pattern which is used to help the flow and how functional the classes will be. Yet again, the other pattern that lies under Structural is Decorator Design which is a very big and unique design. This is used for the structure and foundation of the whole class connecting to the composition aspects or inheritance. The main use is to help find the balance of functionality and speed. Lastly is the Behavioral Design and this is all about communication. This Design holds another important design pattern that being the Command Design Pattern. This being a web that connects more than two classes so when they do that they don’t need to rely on each other.Further explaining this in a service industry like a busy restaurant; customer orders food, waiter takes the order paper than which gives it to the chef who preps it so the customer can get their food. It’s one of many interesting designs that follow.
This is such a diverse and unique topic that may continue to expand. But if you want to start somewhere, start with this page for sure. This will definitely help me moving forward in the software management field.
Source: https://www.freecodecamp.org/news/the-basic-design-patterns-all-developers-need-to-know/