Sagui Itay - Unity Assets, software development and mobile games

Design Patterns Implementation in a Storage Explorer Application

Although a bit old, I found the well-written, interesting article by Breman Sinaga, Design Patterns Implementation in a Storage Explorer Application to be an excellent piece of work. The article discusses several design patterns used in the project, including:

  • Strategy: Define a family of algorithms, encapsulate each one, and make them interchangeable (Gof)
  • Observer: Define a one-to-many dependency between object so that when one object changes state, all its dependent are notified and updated automatically (Gof)
  • Adapter: Convert the interface of a class into another interface client expects. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces (Gof)
  • Template Method: Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain step of an algorithm without changing the algorithm structure (Gof)

The article shows how to incorporate all patterns together into a well-designed, well thought-of tool. Here’s the main introduction from the article:

A lot of information about GoF design patterns has been published, however most of the examples use separate illustration for each pattern, and the sample code is not an application with a real function. The Storage Explorer is a small application that is designed to use several design patterns together. While the main purpose of this submission is to share the code than to teach the reader about design patterns, the discussion about the application design itself is explained using design patterns.

This article discusses the structure of the application, the design patterns that I use, how it works and the advantages of using them. In my opinion design pattern is worth learning. Developers who have design pattern skill can recognize the intent of a program and the purpose by identifying the patterns. The classes with complex relations then can be understood better and faster than if the developers only understand basic OO design. The design patterns can be used as a thinking model for the designer and the code reader.

Breman Sinaga, Design Patterns Implementation in a Storage Explorer Application, Code Project