As humans, one of our greatest strengths is our knowledge. Unlike other animals, we have passed down generations and generations of knowledge, gradually pushing our species to the top of the food chain. With each new generation, new things are discovered, new technological advances are made, and the amount of collective knowledge that the human race possesses grows. It follows naturally that such knowledge also exists in the realm of computer science and, more specifically, software engineering.
One such example of this knowledge is something called “design patterns.” Much like other knowledge that humans pass down, design patterns are knowledge used to solve certain problems. For example, you may have learned in school about the scientific method, a method which scientists use to test hypotheses. In order to do this, a scientist sets up two identical scenarios with a single altered variable. If the results of the two scenarios differs, then the scientist may be able to make the conclusion that the reason why these two scenarios have different results is the single altered variable. This method has been created, refined, as passed down over many years, and is now accepted as the standard method of conducting experiments. In the same way, there are also design patterns that have been created, refine, passed down over the years, and are now accepted as the standard way to solve certain software development problems.
One specific example of this in software development is the concept of model-view-controller, or MVC for short. The basic concept of MVC is that instead of showing data directly to the viewer, there is a controller that mediates what exactly is okay for the viewer to display, and, if necessary, it also updates the data to be shown. In a way, this solution allows for greater control over what the viewer needs, and this data can even be manipulated so that the same web page shows different information to different users.
When I think about design patterns that already exist today, sometimes it’s hard to imagine a time without them. The solutions make so much sense, and I can’t help but think that the person who came up with the solution in the first place was some sort of genius. In this way, I’m thankful that there already solutions to so many problems that I run into every day. Design patterns like singleton, MVC, and factories are concepts that I have learned in my classes and have already used in my own programs. Someone lived their life in a time when these solutions didn’t even exist, but for every generation after them, such solutions have already become widely accepted and implemented. When I think of design patterns in this way, I’m overcome with a sense of amazement and respect for their creators, and I can’t wait to see what sort of design patterns are created in my lifetime, and I wish I could see technology through the eyes of the even more advanced next generation.