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. Design and Architecture
  4. designquestions for my app

designquestions for my app

Scheduled Pinned Locked Moved Design and Architecture
asp-netregexarchitecturetutorialquestion
5 Posts 2 Posters 13 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.
  • A Offline
    A Offline
    akkram
    wrote on last edited by
    #1

    My app have a main form (mdi contaier) with a treeview menu. Interacting with the treeview, for example clicking the project node, opens up a new project form (mdi child), clicking the status node opens up a new status form (mdi child), etc. I want to use a MVC pattern for the gui part and have some questions regarding this (first time using MVC). * Is it sound to have one controller for each form, ie maincontroller, projectcontroller, etc? * As it is now the maincontroller instantiates (opens) the other forms and their controllers and passes along a reference to the mainform (some of the childforms need to update the treeview menu). Is there a better way to do this? /thanks

    P 1 Reply Last reply
    0
    • A akkram

      My app have a main form (mdi contaier) with a treeview menu. Interacting with the treeview, for example clicking the project node, opens up a new project form (mdi child), clicking the status node opens up a new status form (mdi child), etc. I want to use a MVC pattern for the gui part and have some questions regarding this (first time using MVC). * Is it sound to have one controller for each form, ie maincontroller, projectcontroller, etc? * As it is now the maincontroller instantiates (opens) the other forms and their controllers and passes along a reference to the mainform (some of the childforms need to update the treeview menu). Is there a better way to do this? /thanks

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      I would be very surprised if you could break a project down to a 1-1 mapping between controller and view. This was the type of model that was exposed as Document-View and was widely seen as having problems. It is more likely that your controller will have several views.

      Deja View - the feeling that you've seen this post before.

      A 1 Reply Last reply
      0
      • P Pete OHanlon

        I would be very surprised if you could break a project down to a 1-1 mapping between controller and view. This was the type of model that was exposed as Document-View and was widely seen as having problems. It is more likely that your controller will have several views.

        Deja View - the feeling that you've seen this post before.

        A Offline
        A Offline
        akkram
        wrote on last edited by
        #3

        So your saying that I should try keep it down to only one controller? or is there another approach? /thx

        P 1 Reply Last reply
        0
        • A akkram

          So your saying that I should try keep it down to only one controller? or is there another approach? /thx

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          No - I'm saying keep it down to 1 controller per model. You can have multiple views per controller/model.

          Deja View - the feeling that you've seen this post before.

          A 1 Reply Last reply
          0
          • P Pete OHanlon

            No - I'm saying keep it down to 1 controller per model. You can have multiple views per controller/model.

            Deja View - the feeling that you've seen this post before.

            A Offline
            A Offline
            akkram
            wrote on last edited by
            #5

            ok, yes that makes sense :)

            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