Design Patterns and Gang of Four Patterns - Glossary
Gang of Four (GoF) Patterns are 23 classic software design patterns providing recurring solutions to common problems in software design.They were developed by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides, often referred to as the Gang of Four. The patterns are defined in the book Design Patterns: Elements of Reusable Object-Oriented Software
- abstract algorithms
- Algorithms described at a high level (the “what”) while intentionally omitting or deferring the detailed “how.” In OOP and design patterns, this often means defining steps via interfaces/abstract classes so concrete strategies can vary.
Next
- abstraction
-
Modeling a concept by exposing only essential features through a stable interface while hiding implementation details. Abstraction reduces coupling and makes code easier to extend.
Next
- abstract class
-
A class that cannot be instantiated and is intended to be subclassed. It can contain both implemented methods and abstract methods that subclasses must implement.
Next
- abstract method
-
A method declared without an implementation (body). Subclasses (or implementers) must provide the concrete behavior.
Next
- Abstract Window Toolkit (AWT)
- Java’s original GUI toolkit providing components (Button, Frame, etc.) that map to native platform widgets. In modern Java desktop development, Swing and JavaFX are more commonly discussed than AWT directly.Next
- accessor method
- A method that returns the value of a field (state) without modifying it; also called a “getter.” Good practice: keep fields private and expose minimal, meaningful accessors. Next
- access protection
-
Language features (e.g., public/private/protected/package-private in Java) that restrict which code can read or modify members. Access protection supports encapsulation and invariant enforcement.
Next
- API
-
Application Programming Interface. The public surface area (types, functions, protocols) that consumers rely on. A good API is stable, minimal, and clearly documented.
Next
- applet
-
A Java program designed to run inside a browser plugin (historical). Applets are obsolete and unsupported by modern browsers; modern equivalents are web apps, WebAssembly, or native desktop apps.
Next
- application
-
A stand-alone program executed by an OS/runtime (not embedded in a browser plugin). In Java, this typically means running on the JVM with a main entry point or packaged runtime.
Next
- argument
-
A value supplied to a function/method call. Arguments are matched to parameters (the variables declared in the function/method signature).
Next
- array
-
An indexed, fixed-size sequence of elements of the same type. Arrays provide O(1) access by index but are inflexible for frequent insertions/removals (where lists may be preferable).
Next
- ASCII
-
A 7-bit character encoding standard. Modern systems primarily use Unicode (e.g., UTF-8), which is backward-compatible with ASCII for the first 128 code points.
Next
- attribute
-
A piece of state on a class/object (also called a field or member variable). Prefer invariants + encapsulation over public mutable fields.
Next
- Bean
-
A reusable software component. In Java, “JavaBeans” historically implied a class with a no-arg constructor and getter/setter conventions, often used by tools and frameworks.
Next
- behavioral pattern
-
A design pattern category focused on object collaboration and responsibility distribution (e.g., Observer, Strategy, Command, State).
Next
- boolean
-
A logical type with two values: true/false. Used for predicates, conditions, and invariant checks.
Next
- CASE tool
-
Computer-Aided Software Engineering tool. Traditionally used to create and maintain models/diagrams (UML, ERD) and sometimes generate code or documentation from those models.
Next
- children or child
-
Informal synonym for subclass/derived type (or subnodes in a hierarchy). In OOP contexts, “child class” usually means “subclass.”
Next
- class
-
A type definition that specifies state (fields) and behavior (methods). A class can define how objects are constructed, how they interact, and which interfaces they implement.
Next
- client
-
Code that uses another component through its public API (often an interface/abstraction), ideally without relying on private implementation details.
Next
- cohesion
-
A measure of how strongly related the responsibilities inside a module/class are. High cohesion generally improves readability, testability, and maintainability.
Next
- comment
-
Non-executing text in source code intended for human readers. Prefer comments that explain “why” (intent, invariants, constraints) over repeating obvious “what.”
Next
- compiler
-
A program that translates source code into another form (machine code, bytecode, IR). Java compiles to bytecode executed by the JVM (often with JIT compilation at runtime).
Next
- composition
-
Building objects out of other objects (a “has-a” relationship). In design patterns, composition is central to flexibility (e.g., Decorator, Composite, Strategy).
Next
- constructor
-
A special routine used to initialize a new instance. Good constructors establish invariants; they should avoid heavy side effects when possible.
Next
- coupling
-
The degree to which one component depends on details of another. Lower coupling generally improves changeability; patterns often reduce coupling via interfaces and indirection.
Next
- data structure
-
A way of organizing data to support efficient operations (search, insert, delete, traverse). Examples: arrays, lists, trees, hash maps, graphs.
Next
- delegation
-
An object forwards work to another object that actually performs the operation. Delegation is a common alternative to inheritance and enables composition-based design.
Next
- deprecation
-
Marking an API element as discouraged for new use and subject to future removal. Modern practice: provide migration guidance and replacement APIs.
Next
- design pattern
-
A reusable solution template to a recurring design problem in a specific context. Patterns describe intent, structure, trade-offs, and consequences—more than just code.
Next
- early binding
-
Resolving method/function calls at compile time (or link time). Early binding is typically faster but less flexible than late binding (dynamic dispatch).
Next
- encapsulation
-
Hiding internal representation and enforcing invariants through a controlled public interface. Encapsulation enables refactoring without breaking clients.
Next
- exception
-
A runtime event signaling abnormal flow (errors or exceptional conditions). Modern best practice: throw exceptions for exceptional cases, not normal control flow; include actionable context.
Next
- extends
-
A keyword/concept indicating inheritance (“is-a”). In modern design guidance, prefer composition over inheritance when subclassing would expose or depend on fragile internals.
Next
- extrinsic
-
State stored outside an object and supplied from the outside when needed. In patterns, this term is commonly used in Flyweight (extrinsic vs intrinsic state).
Next
- field
-
A variable declared in a class/struct. Fields store object or class state. Prefer private fields with validated access.
Next
- friendly access
-
Informal term often referring to “package-private” (Java) or “friend” (C++) mechanisms that allow selective internal access. Use sparingly to avoid eroding encapsulation.
Next
- factory method
-
A method that creates and returns objects, typically typed as an interface/abstract base, allowing subclasses to decide which concrete type to instantiate.
Next
- getter method
-
Synonym for accessor method. A public method that returns a value from encapsulated state.
Next
- GUI
-
Graphical User Interface. Interaction via visual components (windows, buttons, menus). In design patterns, GUIs frequently demonstrate Factory, Abstract Factory, Observer, Command, and MVC-like structures.
Next
- hierarchy
-
An arrangement where elements are ordered by generalization/specialization. In OOP, class hierarchies support polymorphism but can become brittle if overused.
Next
- implementation
-
The concrete code that realizes an interface, algorithm, or pattern structure. Good pattern write-ups separate “intent” from “implementation details.”
Next
- implementation inheritance
-
Inheriting reusable code from a superclass. Helpful when the shared behavior truly represents a stable “is-a” relationship; otherwise, composition is usually safer.
Next
- inheritance
-
Mechanism by which a subtype receives (and may override/extend) behavior from a supertype. In design patterns, inheritance is often used to vary behavior, but can introduce tight coupling.
Next
- instance
-
A concrete object created from a class. An instance has its own state and can participate in collaborations with other objects.
Next
- interface
-
A contract specifying operations without committing to a particular implementation. Interfaces enable polymorphism and are heavily used to reduce coupling in pattern-based designs.
Next
- Java
-
An object-oriented language running on the JVM, emphasizing portability and a rich standard library. Modern Java includes records, sealed types, modules, and virtual threads (depending on version).
Next
- JavaBeans
-
A component model and naming convention (get/set/is) historically used by tools and frameworks for introspection and UI/data binding.
Next
- Java Development Kit (JDK)
-
The Java development environment: compiler, standard libraries, tools (javadoc, jar, etc.), and runtime components needed to build/run Java applications.
Next
- late binding
-
Resolving which method implementation to call at runtime (dynamic dispatch). Late binding improves flexibility and is fundamental to polymorphism and many pattern implementations.
Next
- literal
-
A fixed value written directly in code (e.g., 42, 3.14, 'a', "text"). Overuse of “magic literals” can reduce clarity—named constants are often preferable.
Next
- member
-
A field or method that belongs to a class. Members may be instance-level or static (class-level).
Next
- method
-
A function associated with a class/object that implements behavior. Methods define what objects do and how they collaborate.
Next
- method overloading
-
Using the same method name with different parameter lists. Overloading can improve readability when the overloads express the same conceptual operation.
Next
- multiple inheritance
-
Allowing a class to inherit from more than one superclass (e.g., C++). It can express powerful relationships but introduces complexity (diamond problem). Many languages prefer interfaces/traits.
Next
- multithreaded
-
A program designed to run tasks concurrently. Modern best practice emphasizes safe concurrency (immutability, synchronization, structured concurrency patterns) and avoiding shared mutable state.
Next
- mutator method
-
A method that modifies object state; commonly called a “setter.” Modern practice: avoid broad setters; prefer intention-revealing methods that preserve invariants.
Next
- noargs constructor
-
A constructor with no parameters. Some frameworks require it for reflection or serialization, but modern design often prefers explicit construction with required dependencies.
Next
- object
-
A runtime entity encapsulating state and behavior. Objects collaborate via message passing (method calls) to implement system behavior.
Next
- object composition
-
Storing other objects as members and delegating to them. This is a primary mechanism for building flexible designs and is central to many structural patterns.
Next
- object-oriented design
-
Designing software by modeling responsibilities, collaborations, and abstractions as objects and classes, emphasizing maintainability and extensibility.
Next
- object-oriented programming
-
A programming paradigm organizing code around objects that encapsulate state and behavior. OOP supports abstraction, encapsulation, inheritance, and polymorphism.
Next
- operations
-
The behaviors (methods) an object/class provides. In UML, operations appear in the operations compartment.
Next
- operations compartment
-
The section of a UML class diagram that lists method signatures (operations), usually the bottom compartment of the class box.
Next
- overloaded method
-
A method sharing a name with another method in the same scope but differing by parameter list (overload set).
Next
- overloading
-
Using the same identifier (typically a method name) for multiple callable signatures distinguished by parameter types/arity.
Next
- overriding
-
Replacing an inherited method implementation with a subclass-provided implementation. Overriding enables polymorphism and late binding.
Next
- packet fragmentation
-
Splitting a packet into smaller fragments to traverse a link with a smaller MTU. In modern networks, Path MTU Discovery is used to reduce fragmentation where possible.
Next
- parent
-
Informal synonym for superclass/base class (the class being inherited from).
Next
- protected
-
An access modifier allowing subclasses (and sometimes same-package code, depending on language) to access members. Use carefully; it exposes internals to a broader surface area.
Next
- read-only properties
-
State exposed via a getter/accessor without a corresponding public setter/mutator. Read-only properties help maintain invariants.
Next
- responsibilities
-
What a class knows (state) and does (behavior). Responsibility-driven design aims to assign responsibilities to keep classes cohesive and reduce coupling.
Next
- return values
-
Values produced by methods/functions and returned to the caller. Return types are part of the method signature and support API clarity.
Next
- Reverse engineering
-
Deriving models/diagrams/design information from existing source code or binaries (e.g., generating UML from code).
Next
- scope
-
The region of code where an identifier is visible/usable. Examples: block scope, method scope, class scope, module/package scope.
Next
- setter method
-
Synonym for mutator method. Prefer domain-specific intention methods (e.g., setSpeed → accelerateTo) when invariants matter.
Next
- sibling
-
Objects of the same class/type. Some languages (or “friend” mechanisms) allow special access among closely related code, but private state should generally remain private.
Next
- signature
-
The identifying parts of a callable’s declaration used for resolution (typically name + parameter types; language-specific rules apply).
Next
- static field
-
A class-level variable shared across all instances. Use sparingly; global mutable state can complicate testing and concurrency.
Next
- static member
-
Any class-level member (field or method) shared across instances. In UML, static members are often underlined.
Next
- static method
-
A class-level method not requiring an instance to invoke. Often used for utilities, factories, or pure functions—avoid turning classes into “god utility” buckets.
Next
- subclass
-
A type derived from another type (superclass/base class). Subclasses inherit and may override behavior; they should obey substitutability (LSP) to remain safe to use polymorphically.
Next
- superclass
-
A type from which another type derives. A superclass defines behavior/state shared across subclasses.
Next
- variable
-
A named storage location holding a value that can change over time. Variables may be local, instance, static/class-level, or captured (closures), depending on the language.
Next
- void
-
A return type indicating “no returned value.” In modern APIs, void methods should still clearly signal success/failure via exceptions or explicit result types when appropriate.
Next
- write-only properties
-
State that can be set but not read via the public API. This is uncommon; consider whether the design is clearer with commands/intention methods or whether state should be readable for diagnostics/testing.
