an, do you remember that article we wrote about framing devices?"
"That was a damn good article. How did it go again?"
"Well, I believe it went something like this..."
The Framing Device is a narrative technique in which a story is surrounded ("framed") by a secondary story, creating a story within a story, often through Separate Scene Storytelling. The inner story is usually the bulk of the work. The framing device places the inside story within a different context.
Framing devices typically involve outer-story characters as the audience of the inner story, such as a parent reading a bedtime story to a child. Other times, the outer-story character is the author of, or a performer in, the inner story. Occasionally, the inner story is a hallucination or delusion experienced by one of the outer-story characters.
The inner story does not need to be a work of fiction from an frame-story character's point of view: letters, journals, and memoirs can also be used as framing devices, often in the form of Day in the Life.
Anthologies and Clip Shows often use framing devices to connect the unrelated elements into a unified whole. The earlier "Treehouse of Terror" specials of The Simpsons use a framing device in this way, though the practice was eventually abandoned.
Occasionally, an entire series can use a persistent Framing Device, such as Cro, which was framed by a recently thawed mammoth, who was telling the stories which composed the bulk of each episode. A noteworthy example from the days of radio is Yours Truly, Johnny Dollar, whose stories were told in the form of explanations to a private detective's expense account. To a lesser extent, devices such as the Captain's Log can be viewed as a Framing Device, especially when (as in many Star Trek the Original Series episodes) they appear to have been written after the fact.
The Framing Device is Older Than Dirt: It goes right back to the Old Kingdom of Ancient Egypt with the Tale of the Shipwrecked Sailor, c. 2300-2100 BCE. Sometimes the trope is written using nested framing devices that are several layers deep, as in the Arabian Nights. Frankenstein is framed by a story of an arctic expedition coming across the dying Dr. Frankenstein; The Rime of the Ancient Mariner is framed by the mariner foisting his story on an unwilling wedding guest. One of the first (if not the first) examples in film is from The Cabinet of Dr. Caligari, which (on a suggestion from Fritz Lang) framed the original story as a Flash Back in an asylum.
The technique sometimes seems to be a byproduct of an ancient notion that it was improper to waste people's time with lengthy fabrications.
This is frequently used as a technique to highlight that the narrator of the framed story is not the actual author, and so draw attention to the possibility of an Unreliable Narrator.
See Whole-Episode Flashback, Storybook Opening, and Nostalgic Narrator for more specific examples. When framing devices are stacked on top of each other, they create a Nested Story. If the existence of a framing device is used as a Plot Twist, we're dealing with a Nested Story Reveal. If the framing story is "I came across this story and decided to publish it", the author is invoking the Literary Agent Hypothesis.