Infinitely Reuse The Same Solution

01 Dec 2022

Do you truly understand what design patterns are and how amazing they are?

Design patterns are not simple as you think

When I first heard the words “design patterns”, I simply thought of them as the patterns of the pages that I design. For example, the containers (margins between the contents and browsers), navigation bar (menu at the top of page), and footer (menu at the bottom of the page). These are common patterns of designs that I have seen in many websites, but design patterns are much more to it. By Christopher Alexander (an architect and design theorist), design pattern “describes a problem that occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.” It seems like that I only know the surface or the tip of design patterns.

Thinking deep into design patterns, they are truly amazing. Design patterns come from a group of smart people and if you do web applications, you must have known them as the Gang of Four. Design patterns are generally a reusable solution to a commonly occurring problem in software design. They are like a description or template that can be used in many different situations. I have been building websites without knowing that I have been using the design patterns. It’s like that I used the design patterns, but I do not know the existence of it.

The cool use of design patterns

Taking a look back into my previous web applications, I definitely had been using a lot of design patterns. Most of my web applications come from the meteor templates given from my professor. These templates are the design patterns that I didn’t notice about. I have been using the same template over and over again for different web applications. They definitely made my life so much easier. If I were to build the web application from scratch, the outcome would definitely be really bad. Now that I think about it, without the design patterns, I couldn’t really do anything and my web application will not function properly.

Taking my ICS 314 (Software Engineering I) final project as an example. The name of the project is “Study Partner” and the purpose of this project is to let UHM ICS students self-organize face-to-face study groups around a course and/or specific homework or project topic. In this way, students wouldn’t need to spend more time than they need on their homework and be able to study with a group of people. One example of design patterns in this project is the observer design patterns. Once a user signs in, there is a calendar link in the navigation bar and the user is able to create or join sessions from it. Depending on the course, different users will be notified about the session.