May 19th, 1999, 03:48 AM
What do you mean by Document Architecture
|
Click to See Complete Forum and Search --> : Document Architecture May 19th, 1999, 03:48 AM What do you mean by Document Architecture May 20th, 1999, 02:29 AM This answer is much over-simplified for brevity...there are literally entire books dedicated to the subject! The Micro$oft Foundation Classes (MFC) is based on a "Document/View architecture", which reflects Micro$oft's "document-centric" UI design. The idea is that your data lives in a "document", and you display it through a "view". A single document can have more than one view, each displaying the same data in a unique fashion (text/graphics/whatever). For example, a fictitious document might contain a list of filenames, while one view displays an Explorer-like tree, a second might display a text report. The data doesn't change, only the view of it. A very simple application would have only one document type, and only one view; in this (simple) case, separating the two doesn't seem to make sense. However, in more sophisticated applications--which MFC is intended for--it makes a BIG difference to separate the data management (document) from the display logic (views). The entire MFC class library is designed around this theory, with the CWinApp, CDocument, and CView classes tightly coupled. Starting in MSVC 6.0 you can remove the Doc/View stuff from the Wizard, but that will exclude a good chunk of the MFC classes from your app. For what it's worth, an excellent book on the subject is "The MFC Answer Book" by Eugene Kain. The first three chapters deal almost exclusively with how to make the Doc/View architecture work. Cheers! Humble Programmer ,,,^..^,,, sanjay May 20th, 1999, 04:05 AM thank you, sanjay. Regards, Sanjay sanjaypavangp@hotmail.com codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |