Insights | The 5 Ways to Improve Your Software Quality: Design Patterns

The 5 Ways to Improve Your Software Quality: Design Patterns

By Andy Hilliard | January 21, 2014

There are five ways to improve software quality, and this post focuses on design patterns.

A design pattern simply takes the solution from a previous problem and applies the concepts from that solution to solve a new problem.

 

I recently moved into a new house, and in my new home office, there is area section of floor made of rough stone, which once was under a wood stove. I thought this area would be an ideal place for bookcases, except the rough surface was too uneven. I came up with numerous ideas to try and fix this, including ones that required putty and sand, but none of my ideas were as fool-proof as what a carpenter finally suggested. The carpenter explained how to plane wood and utilize shims to solve my problem.

He had a design pattern – a proven process that had solved many other other construction problems. (And you can see my now stable bookcases behind me in our recent software outsourcing videos).

Programmers face similar situations. Problems arise, and if the programmers have never experienced that specific problem before, they might try something akin to my putty-and-sand idea. In the 1990s a group of programmers (called The Gang of 4) recognized this kind of situation and wrote a book about the commonly repeated patterns of object-oriented programming (Java, C++, etc.). They developed a problem-solving catalog for programmers that detailed existing design patterns and the circumstances in which they would want to use those patterns. The Gang of 4 also divulged the consequences of using certain patterns and what limitations they might experience later.

There are three patterns most often used in object-oriented programming.

Publish-Subscribe Pattern

The first is the observer pattern, which is also known as the publish-subscribe pattern.This is a behavioral pattern that watches for changes in one part of the application and then communicates those changes to other objects within the program. This is a dynamic pattern that notifies other systems or objects when changes occur. For example, this is the pattern responsible for updating schedules in response to changes in a “date” field. The observer pattern is looking for behavior in that field and prompts other objects in the code to use that new date.

Factory Pattern

The second type of pattern commonly used in object-oriented programming is the factory pattern. This is considered a creational pattern, because it eliminates the need to write code for each different object that needs to be created. For example, factory patterns are used to create the dialog boxes in Windows and Mac OS. The code in the factory pattern runs a test to determine if it’s running on Windows or running on a Mac. Depending on the answer, it creates the appropriate box in the appropriate way. The pattern simplifies the code, because the pattern creates the dialog boxes in the unique way necessary, without the need to write code for every type of box.

Structural Pattern

This pattern helps organize objects in the code and is especially helpful with combining objects into larger structures.

Professional programmers are expected to know and use design patterns. There are several design pattern resources available that can help programmers develop solutions to new problems – there is no need to try putty and sand. Software developers who use design patterns as part of their organization’s culture greatly enhance the shared knowledge within their software development group, and the quality of the software they develop.

When evaluating a software development service company, ask them about their use of design patterns when developing software for their clients. IT’s one of the things we look for when assessing our global partners.


Interested in reading more?

More from Accelerance

February 22, 2021

FOLLOW THE SUN: Why Asia has the edge for low-cost, high-delivery software outsourcing

Countries with rapidly developing technology sectors such as Vietnam and Bangladesh, and emerging software outsourcing industries in Malaysia and Thailand offer some great opportunities for Western...

February 19, 2021

Spotlight on Bangladesh: Liberation Inspires an Emerging Software Development Industry

One of the most densely populated cities in the world, Dhaka – the capital of Bangladesh – is home to more than half a million rickshaws. Uber and other taxi services are just as easy to find; it’s...

February 17, 2021

Offshore Software Development in the Philippines

A US colony for nearly 40 years, Manila is a sprawling city with modern high-rises and traditional Filipino charm. The capital of the Philippines is extremely Westernized and considered one of the...

Whitepapers

December 3, 2020

2021 Due Diligence Guide

Learn About the Key Advantages to Outsourcing in Eastern & Central Europe:

September 25, 2020

Guide to Outsourcing in Eastern & Central Europe

Learn About the Key Advantages to Outsourcing in Eastern & Central Europe:

August 15, 2020

2020 Guide to Software Outsourcing Rates

Gain insight into the latest rates for software development outsourcing resources with our proprietary benchmarking guide that offers:


How can we help you succeed?

We make outsourcing successful with innovative partner selection services and tailor-made consulting solutions to ensure your desired outcomes.

Let’s Get Started