Skip to content

Competing Qualities & Trade-offs

Estimated time to read: 3 minutes

Competing Qualities

As you design software to satisfy requirements, you have to make many important decisions.

Some software design decisions will involve tradeoffs in different quality attributes, such as performance, convenience and security.

Example Scenario

Think about balancing such qualities when designing a front door to a house.

You add a single lock and don't feel very secure; It's easy to open and close the door very quickly. So, you continue to add extra security.

You keep adding locks until you realise it's very time consuming and inconvenient to unlock your door.

Instead of mindlessly adding locks, you must come up with a design that balances security with both convenience and performance in mind.

Context

Context is important to determine what choice of solution is right for the balance of qualities. For example, a home located in a low crime area will require different security needs from one located in a high crime area.

For software, talking to its stakeholders will help you to understand the context. Sometimes choices made in your software designs can have unintended consequences. For example, an idea that seems to work fine for a relatively small amount of data may become impractical if there is a need to deal with a lot more data.

Perspectives

It's good to get other perspectives on your technical designs for a more rounded implementation. These perspectives can be in the form of asking other developers for their opinion or having a design review session.

In the home example, you may decide to install bars on the window of a house built in high crime neighbourhood. However, the bars might have the unintended consequence of preventing an escape through the windows in case of fire. These consequences could have been avoided if a fire marshal's perspective had been considered before implementation.

Testing

Besides design reviews, it is worthwhile to slow down while implementing a system and test it carefully.

You can prototype alternative ideas and run tests to see what works best. If a design decision has unintended consequences, tests can help to catch them. In the same way for the home example, running an emergency escape drill would detect the bars as impeding a fast escape.

Functional Requirements

For software, there are functional requirements that describe what the system or application is expected to do.

For example, a media app has a functional requirement of being able to download a full length movie.

Naturally, a software design needs to outline a solution to meet such requirements correctly. So, a key quality to satisfy is simply correctness.

Non-functional Requirements

Besides functional requirements, there are also non-functional requirements that specify how well the system or application does what it does. Such requirements may describe how well the software runs in particular situations.

For example, the media app can have non-functional requirements to download a full length movie at a specific speed and to play such a movie within a certain memory limit.

Beyond correctness, other qualities to satisfy include performance, resource usage and efficiency, in terms that can be measured from the running software. Both functional and non-functional requirements are important to satisfy. You'll need to discuss what is acceptable with the stakeholders.

Constraints

The desired qualities will put constraints on your system's design. Consider an analogy involving categories of cars. Both sports cars and minivans meet the functional requirement of providing transportation.

But each category, indeed each model of car, offers a different balance of achieved non-functional requirements with different factors like acceleration, handling, cargo capacity, weight and fuel economy.

Another kind of non-functional requirement concerns how well the code of the software can evolve. For example, parts of the implementation may have to support use in other similar software products. Also, the implementation may have to allow for future changes.

So, other qualities to satisfy for the software can include re-usability, flexibility and maintainability. As the design gets detailed and the implementation is constructed, the required quality should be verified through techniques like reviews and tests. As well, certain qualities can be validated with feedback from end users.