“To understand is to perceive patterns” - Isaiah Berlin
Everything in the world is made up of patterns. From behavior to math, science, language, and even nature, everything around us is made up of or can be predicted by patterns. Implementation and understanding of patterns build the world around us. Patterns affect every aspect of our lives, including software design.
Almost every aspect of computer science is just applied mathematics. And as is well known, math is largely just the discovery and development of naturally occurring patterns. From basic binary to RSA encryption, computers rely heavily on patterns to create and manipulate our everyday experiences. Some more examples of computers putting patterns to work are:
Obviously, computers use patterns to perform practically every function. I would be willing to bet, that you could define any process a computer can complete using the word “pattern”, or at least in the context of the word “pattern”. Largely because computers are just a cool application of math, you can understand everything just by having a good understanding of patterns.
There are three main types of software design patterns. Creational patterns, which dictate rules for object creation, structural patterns, which focus on composition of classes or objects, and behavioral patterns, which address how objects interact and communicate. Each plays an important part in software design, as it not only organizes software well, but also allows many developers to work together with an understanding of how to implement the intended goal. Design patterns allow everyone to stay on the same page as to what is going on in the code and give abstract rules to the design process. The main benefits of software design patterns are reusability, scalability, maintainability, and testability.
The key principals of all software design patterns are
Each of these components work together to embody and define software design patterns. Software design patterns are meant to aid the software development process, and with continuous improvement and evolution, these patterns have an overwhelmingly positive impact on the development community. Some examples of well-known software design patterns are:
In the development process, a developer or team of developers may implement a range of software design patterns. Many are taught as best practice, and as a result aren’t even a topic of discussion. Overall, software design patterns greatly assist the software development community by making code more cohesive, understandable, manipulatable, maintainable, and scalable. Although many of the patterns that are well defined would likely have come to be standard practice without explicit enumeration, the benefit remains in that an abstract topic has been made into a clear standard, allowing developers to advance as a community.
Throughout my development projects, I have used a great number of software design patterns in my code. Due to the high level of intuitiveness in software design patterns, you can hardly implement any project without including at least a few software design patterns!
For example, I am currently in the process of creating an app called Rainbow Gallery. This app is being created as a team, therefore organized, readable, and intuitive coding practices are incredibly important. We have used the Factory Pattern and Abstract Factory pattern on many counts, to ensure that code is manipulatable and can be applied in many contexts. In designing our databases and how they interact, we have implemented the Composite Pattern, a structural pattern, through the relationships between posts in the app and users. We have also implemented the Observer Pattern, a behavioral pattern in which there is a one-to-many dependency between objects, in the user, following, and posts structure of our app. As a final example, we have implemented the Command behavioral pattern, in which requests are encapsulated as objects, in how we upload posts to the app.
Overall, software design patterns are extremely important to the development process. They allow for more cohesive, understandable, and manipulatable code throughout a project. Additionally, they act as principals that encourage best practice implementations, preventing many potential issues within projects. Patterns really do make the world go round, and will continue to be prevalent in future code, allowing developers to create a cohesive symphonic masterpiece of patterns through their projects.