Design Patterns

01 May 2018

It would not be a far stretch to say that concepts of design patterns originate from constant problems or failures over time. “Learning from mistakes” truly takes a special meaning in this sense, as design patterns are created to combat these problems, and over time, can continue to improve. These patterns can be traced back to Christopher Alexander, an engineer who shared his revelations with design issues with structures. Design patterns can be applied to software development, and typically come in the format of creational patterns, structural patterns, and behavioral patterns. Creational patterns focused on how to create objects, structural patterns focus on how to represent collections of objects, and behavioral patterns focus on how to manage interactions between objects. Design patterns truly became revolutionary because they addressed a wide variety of problems a template solution to a variety of problems they may be experiencing. In software engineering, design patterns typically enable to software to be comprehensible, re-usable, and bug-free. Some common design patterns are factory, singleton, observer, and MVC.

I have encountered the Model-View-Controller (MVC) pattern in previous web projects. This allows the three classes of code to remain separated and allows the codebase to be maintained easier. I have also used singletons in many projects, as manager or utility classes that controlled other objects and classes. I’ve additionally had experience using factories in Java, where a factory class is used to produce instances of other classes.