Question

how are the classses in MFC match the model-view-control pattern ?

the model is suppose to handle the Business Logic , the control suppose to be some kind of mediator and the view suppose to be the gui ?

what class in MFC represent each one ? cause it seems pretty different to me as i read more about mfc. (seems like CView represent the control, CfrmWnd the view , and CDocumnet the data- though i'm not sure if by data they mean BL)

clarifications ?

1
2
12/20/2009 12:34:56 PM

Accepted Answer

MFC is a Document/View architecture, not a full-blown MVC. Reference MFC Library Reference Document/View Architecture.

In short in MFC the CDocument is the Model, and the CView classes combine the View and Controller aspects.

By "BL" in your question do you mean "business logic"? And in this case the CDocument does not mean business logic, but the actual data underlying your app.

3
12/24/2009 2:24:49 AM

MFC does not implement the MVC pattern. However, there are ways to integrate MVC with MFC.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon