Skip to content

Magic Pushbutton

A UI and architecture antipattern that funnels a complex form and many unrelated business rules through one terminal button, causing monolithic logic and delayed feedback.

Version
v1 · 2026-09-28 · History
Domain-specific #
10522
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Subdomains
Software Engineering, Graphical User Interface Anti Patterns → Computer Science & Software Engineering
Aliases
Magic button anti-pattern, Magic pushbutton anti-pattern

Core Idea

The magic pushbutton couples an interface's accumulated state to business behavior at one late event. A large input session culminates in a handler that validates, decides, persists, and routes, often mixing concerns that should evolve independently.

The harm is both architectural and experiential. Domain logic becomes hard to reuse or test, while users receive guidance and errors far from the input that caused them. One button is not inherently wrong; the diagnostic is concentrated heterogeneous responsibility and temporal coupling.

Scope of Application

  • GUI architecture. Detects monolithic event handlers.
  • Web forms. Diagnoses late validation and costly correction.
  • Domain-driven design. Motivates separation of business logic from widgets.
  • Legacy modernization. Identifies refactoring seams around one overloaded action.

Clarity

Inventory responsibilities behind the trigger, when each rule first has enough information to run, where state is preserved, and whether domain logic is independently callable. Separate final authoritative checks from earlier advisory feedback. Inclusion test: Show a complex interaction whose meaningful validation and business processing are concentrated behind one terminal trigger, with poor cohesion or late feedback as a result. Exclusion test: Exclude a simple confirmation button, a thin submit command over separated services, and transactional commit intentionally preceded by rich incremental validation. Nearest boundary: A command button can legitimately initiate one cohesive operation; it becomes magic when it hides many unrelated rules and is the only bridge between accumulated input and business behavior. Exit condition: The antipattern is removed when domain logic is separated and the interface can validate, guide, and update relevant state at appropriate intermediate events. Common misclassifications: It is not every Submit or Save button. It is not an argument against atomic commits. A thin event handler delegating cohesive logic is not the antipattern. Incremental validation need not duplicate authoritative server-side validation. Nearest named distinctions: Command pattern: Encapsulates one request and can improve separation. Transaction script: May be cohesive despite procedural organization. God object: Concentrates broad system responsibility beyond one UI trigger. Wizard: Splits interaction into stages and can still be well or poorly architected.

Manages Complexity

The antipattern hides dependency complexity in one event; refactoring redistributes it into cohesive domain services and timely interaction rules that can be reasoned about separately.

Abstract Reasoning

  1. Trace the interaction from first input to submission.
  2. List every responsibility activated by the trigger.
  3. Separate domain rules, orchestration, persistence, and presentation.
  4. Move safe guidance and validation nearer their enabling inputs.
  5. Retain a thin final command and test both incremental and authoritative paths.

Knowledge Transfer

The choke-point diagnostic transfers to APIs and batch jobs when one boundary accumulates unrelated responsibilities, but UI feedback concerns must not be projected unchanged.

Neighborhood in Abstraction Space

Magic Pushbutton sits in a crowded region of the domain-specific corpus (29th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.

Family — Organizational Patterns & Management Concepts (29 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-08