Keeping It Consistent

27 Apr 2023

Consistentcy Consistentcy Consistency

In my good old young boy days, I played basketball for a team where every team member had a nickname. My nickname was Mr. Consistent. Now why was I nicknamed Mr. Consistent? It was because I was always reliable when the team needed me and I was easy to play with. This is very similar to the purpose of design patterns. The people who created these design patterns, walked so that we could run.

Through software engineering, reviewing and reading reliable and readable code is essential. Thus having consistent design patterns will help make the code more reusable, readable, and consistent consistent consistent. With this in mind, a perfect example of design patterns was given by Professor Philip Johnson, who said they are like different roofs. There are different types of roofs for different kinds of environments that the house is going to be in. Relating to coding, there are different variations of solutions that fit the problems that you are encountering.

Recently I have been more exposed to design patterns through the ICS314 final project. Using the Bowfolios template, we commonly saw the same format when it came to creating a collection, making meteor methods, and reimplementing components. For example, when creating our ClubsCollection and EventsCollection, those javascript files essentially had the same format, where we created an EventsCollection class, with instantiating a new Mongo Collection named EventsCollection, a schema representing the properties of the class, and a user and admin publication name with an Events instantiation at the end. Then, Meteor methods and consistent form/card components allowed us to consistently add and view these collections in a very user-friendly way. Furthermore, these collection files tell a good story by keeping it consistent. To end off, each of the collections tells its own version of the same story with its own personality, which is how code should be written, as a story.

This list of different collections can be found Here