GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Main page
  • Contents
  • Current events
  • Random article
  • About Wikipedia
  • Contact us
  • Help
  • Learn to edit
  • Community portal
  • Recent changes
  • Upload file
  • Special pages
  • Search
  • Donate

This view

  • Original page
  • New address

GeezerVison is showing en.wikipedia.org — Sequential coupling - Wikipedia

This article is an orphan, as no other articles link to it. Please introduce links to this page from related articles. (December 2022)

In object-oriented programming, sequential coupling (also known as temporal coupling) is a form of coupling where a class requires its methods to be called in a particular sequence. This may be an anti-pattern, depending on context.

Methods whose name starts with Init, Begin, Start, etc. may indicate the existence of sequential coupling.

Using a car as an analogy, if the user steps on the gas without first starting the engine, the car does not crash, fail, or throw an exception - it simply fails to accelerate.

Sequential coupling can be refactored with the template method pattern to overcome the problems posed by the usage of this anti-pattern.[1]

References

  1. ↑ Andriy, Buday (15 April 2010). "Refactor: Sequential Coupling => Template Method". The Code Project. Retrieved 23 April 2011.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Sequential_coupling&oldid=1375374471"
Category:
  • Anti-patterns
Hidden categories:
  • Articles with short description
  • Short description is different from Wikidata
  • Orphaned articles from December 2022
  • All orphaned articles
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.