Everything2
Near Matches
Ignore Exact
Full Text
Everything2

document/view architecture

created by xdc

(thing) by glindsey (2.5 mon) (print)   ?   (I like it!) Mon Nov 19 2001 at 18:23:21

Introduced as part of version 2.0 of MFC (Microsoft Foundation Classes), the document/view architecture is Microsoft's solution to abstracting out application data, separating it functionally from how that data is displayed. In a document/view application, data used by the document is represented by a document object, and views of that data are represented by different view objects. The application itself becomes a sort of container for the assorted objects held.

Programs using the document/view architecture can use either a single document interface (SDI) or a multiple document interface (MDI). An SDI program can only have one document open per instance, while an MDI program can deal with multiple documents at once. Earlier versions of Microsoft Word used an MDI interface; new versions use an SDI interface and open a new program instance for each document opened.

When used properly, the document/view architecture can be extremely powerful. Spreadsheet data, for example, can be stored in a document object, and displayed as a table in a view object. If, subsequently, the programmer wants to add a chart view for the data, another view object can be created without changing the document object at all. This sort of modularity allows for better code readability and easier code reuse... in theory.

In practice, failure to adhere to the architecture can lead to horrendous code. Because MFC and document/view do so much work "behind the scenes", hacks and kludges can turn a relatively easily understood program into a freakish code nightmare.


printable version
chaos

multiple document interface Model-View-Controller MFC Microsoft Visual C++
model minority Philosophy won't keep you warm at night Owl DPT
Penitentiary of the Gods Source Code as Speech Cyberdyne Systems Series 800 Model 101 Version 2.4 Controller
kludge Microsoft architecture View
Document
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Just another sprinkling of indeterminacy
pear
Everything Quests: The E2 Tourist Guide
Intelligence Services
Poseidon Family
Stephen Foster
I, Robot
I Sing the Body Electric
Supergirl
K-mart jeans and Payless shoes
The Information
Electrical outlet
Diego Rivera
mouser
New Writeups
Glowing Fish
Tualatin River(place)
The Jacket
Words of Advice(idea)
keepinitreal
Why buy the cow when you can get the milk for free?(idea)
John_Fox
Good Intentions Gone Wrong(person)
Cuckowski
Slavonic Princess(poetry)
Heitah
Posthumous Oscar(thing)
ignis_glaciesque
University of South Florida(place)
ignis_glaciesque
Flogstaskriket(idea)
liveforever
Caesar's last breath(idea)
dagnyswaggart
she wants to believe(personal)
antigravpussy
he doesn't know, but her eyes widen too far(thing)
dagnyswaggart
Wild tides guard her secrets(poetry)
Lord Brawl
Caesar's last breath(poetry)
locke baron
Forgotten things in space(fiction)
sitaraika
Colours(idea)
This affordable entertainment brought to you by The Everything Development Company