Even though I’ll be receiving my degree in computer engineering next semester I still easily consider myself a beginner. Yes, I have experience in certain things from my classes and VIP project but there is still so much to learn about programming. Although there is worlds of information to experience one thing I have learned and come to appreciate is design patterns and knowing when and how to use them.
Design patterns are solutions to recurring problems programmers come across, basically descriptions on how to solve a problem that arises. They can all be classified into three different categories; creational, structural, and behavioral. Creational refers to patterns designed for class instantiation, which is mainly used to make code more flexible to be able to reuse it. Structural patterns deal with class and object composition or in other words, assembling objects and classes into larger structures. Behavioral patterns are used in communication between objects and how responsibilities are assigned between objects.
In the five years I’ve been learning how to code, I’ve used many different design patterns. The top two that I’ve used are the observer and model view controller. Using the observer method, the pages from an application are able to retrieve data and be notified on any changes. On the server side, the collections were published with the clients being able to subscribe to a collection’s publication and display the needed information. With this method, if a collection changes on the server side, the data on the client side will reload and update with the changes made. The model view controller deisgn pattern makes it a lot easier to find solutions to these problems. This method integrates the user-interface and backend components.