Skip to content
Design Corner Knowledge Base ← Back to designcorner.co.ke
Knowledge Base

Software and Development

Singleton

Also known as: Singleton pattern

1 min read Updated November 10, 2026

Definition A programming design in which only one instance of something is allowed to exist.

What it is

A singleton is a design in which only one instance of something is allowed to exist. A single settings object or database connection shared by the whole program is a singleton.

Why it matters for your business

It prevents conflicts, but overuse makes code harder to test.

Real-world example

A site has a single settings object read by all pages.

Design Corner tip

Ask developers to explain design choices that limit flexibility.