Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Is Doc/View a great architecture?

Is Doc/View a great architecture?

Scheduled Pinned Locked Moved C / C++ / MFC
c++cssarchitecturequestion
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jan Sommer
    wrote on last edited by
    #1

    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 L S 3 Replies Last reply
    0
    • J Jan Sommer

      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 Offline
      I Offline
      includeh10
      wrote on last edited by
      #2

      Doc/View is not a good design - mu opnion. But if you use MFC, you should use Doc/View, or may have trouble.

      J 1 Reply Last reply
      0
      • I includeh10

        Doc/View is not a good design - mu opnion. But if you use MFC, you should use Doc/View, or may have trouble.

        J Offline
        J Offline
        Jan Sommer
        wrote on last edited by
        #3

        How come you think it's a bad design?

        1 Reply Last reply
        0
        • J Jan Sommer

          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.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • J Jan Sommer

            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.

            S Offline
            S Offline
            Stuart Dootson
            wrote on last edited by
            #5

            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

            J 1 Reply Last reply
            0
            • S Stuart Dootson

              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

              J Offline
              J Offline
              Jan Sommer
              wrote on last edited by
              #6

              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?

              S L 2 Replies Last reply
              0
              • J Jan Sommer

                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?

                S Offline
                S Offline
                Stuart Dootson
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • J Jan Sommer

                  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?

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  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.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups