Is Doc/View a great architecture?
-
I want to develop an application with some kind of grid like the one in Excel. I'm using wxWidgets and there's support for the Doc/View-architecture. How many of you out there are using this for c++-applications? Are there better alternatives? It's a MDI-application with very few dialogs. If that matters.
-
I want to develop an application with some kind of grid like the one in Excel. I'm using wxWidgets and there's support for the Doc/View-architecture. How many of you out there are using this for c++-applications? Are there better alternatives? It's a MDI-application with very few dialogs. If that matters.
Doc/View is not a good design - mu opnion. But if you use MFC, you should use Doc/View, or may have trouble.
-
Doc/View is not a good design - mu opnion. But if you use MFC, you should use Doc/View, or may have trouble.
How come you think it's a bad design?
-
I want to develop an application with some kind of grid like the one in Excel. I'm using wxWidgets and there's support for the Doc/View-architecture. How many of you out there are using this for c++-applications? Are there better alternatives? It's a MDI-application with very few dialogs. If that matters.
The answer really depends on whether it is reasonably easy for you to develop your application using it, and whether it will satisfy your needs, in terms of finished product. And if you really want MDI then Doc/View is probably your best option. I have used it in the past and found it produces very usable programs.
-
I want to develop an application with some kind of grid like the one in Excel. I'm using wxWidgets and there's support for the Doc/View-architecture. How many of you out there are using this for c++-applications? Are there better alternatives? It's a MDI-application with very few dialogs. If that matters.
Doc/View is probably not quite as good as MVC (it's ambiguous where UI commands should be handled) as used and promoted in Qt[^], but all of these architectural styles rely on your detailed design and implementation not violating the qualities implicit in thm. So, in the case of DocView, make sure the Doc class is entirely unaware of any of the views. It should provide methods sufficient for the view to display the document and modify the document, should you choose to handle the UI commands outside the document class.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
Doc/View is probably not quite as good as MVC (it's ambiguous where UI commands should be handled) as used and promoted in Qt[^], but all of these architectural styles rely on your detailed design and implementation not violating the qualities implicit in thm. So, in the case of DocView, make sure the Doc class is entirely unaware of any of the views. It should provide methods sufficient for the view to display the document and modify the document, should you choose to handle the UI commands outside the document class.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
thank your for your informative reply. But MVC is not used in C++ is it? I thought it was for web applications only. Do you know of any documents that describe the Doc/View architecture in a way that's not MFC/wxWidgets-specific?
-
thank your for your informative reply. But MVC is not used in C++ is it? I thought it was for web applications only. Do you know of any documents that describe the Doc/View architecture in a way that's not MFC/wxWidgets-specific?
Jan Sommer wrote:
MVC is not used in C++ is it?
It's not language specific - no architectural design patterns are, really, apart from those low-level design patterns that are more about getting around deficiencies in some languages. DocView (IMO) is basically a Microsoft derivation (and simplification, which loses some of the purity) of MVC. Have a look at the Wikipedia page on MVC[^] - although it talks a lot about web stuff, the history section shows that it is definitely NOT web specific. I don't really know of any Document/View documentation that isn't MFC/wxWidgets related.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
-
thank your for your informative reply. But MVC is not used in C++ is it? I thought it was for web applications only. Do you know of any documents that describe the Doc/View architecture in a way that's not MFC/wxWidgets-specific?
Jan Sommer wrote:
Do you know of any documents that describe the Doc/View architecture in a way that's not MFC/wxWidgets-specific?
I don't know of any specific documents, but I would expect that MSDN contains a lot of the information you need to utilize the Doc/View architecture, including sample code.