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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Design and Architecture
  4. Modularizing Help

Modularizing Help

Scheduled Pinned Locked Moved Design and Architecture
helptutorialquestionc++design
4 Posts 3 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.
  • A Offline
    A Offline
    Aaronov
    wrote on last edited by
    #1

    I was told I should probably ask this here, even though it relates to MFC, it is probably more a design question. So, At my workplace we have a number of programs (sub systems) which make up our software. Some of these programs need functionality from other programs and I'm trying to find a good way to perhaps modularize each program so that common code/resources can be used "globally". The current example forcing me to find a solution is the need to launch a dialog from our Accounting package from another sub system. The big problem is that this is quite a large dialog and depends a lot on things from the Accountings MainFrame. I was thinking that for each sub system I could create a DLL which contained common dialogs, etc that could be used by other programs. The problem I face is that a lot of the dialogs have dependencies on their parent programs MainFrame and I'm not sure how to get around it. I guess one solution might be to take everything out of the MainFrame and put it into its own class which can then be passed to the DLL.. but I don't even know if that would work as I still need to Initialise this new class the same way it would be done in the parents program, but now in the other sub system.. though in saying that the DLL should probably be responsible for setting itself up. Your thoughts? Cheers

    L 1 Reply Last reply
    0
    • A Aaronov

      I was told I should probably ask this here, even though it relates to MFC, it is probably more a design question. So, At my workplace we have a number of programs (sub systems) which make up our software. Some of these programs need functionality from other programs and I'm trying to find a good way to perhaps modularize each program so that common code/resources can be used "globally". The current example forcing me to find a solution is the need to launch a dialog from our Accounting package from another sub system. The big problem is that this is quite a large dialog and depends a lot on things from the Accountings MainFrame. I was thinking that for each sub system I could create a DLL which contained common dialogs, etc that could be used by other programs. The problem I face is that a lot of the dialogs have dependencies on their parent programs MainFrame and I'm not sure how to get around it. I guess one solution might be to take everything out of the MainFrame and put it into its own class which can then be passed to the DLL.. but I don't even know if that would work as I still need to Initialise this new class the same way it would be done in the parents program, but now in the other sub system.. though in saying that the DLL should probably be responsible for setting itself up. Your thoughts? Cheers

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

      Aaronov wrote:

      I was thinking that for each sub system I could create a DLL which contained common dialogs, etc that could be used by other programs. The problem I face is that a lot of the dialogs have dependencies on their parent programs MainFrame and I'm not sure how to get around it.

      That will depend on the type of dependency. If it's an enum that get's shared, move it to another library that both the DialogDll and the ParentProgram can access. That could also be done for customized buttons and UserControls - if those have been designed with a separation of UI/data. It it's data that the dialog depends on, I'd suggest using some kind of IPC with the ParentProgram, or calling a webservice that interacts with the ParentProgram's datastore.

      Aaronov wrote:

      though in saying that the DLL should probably be responsible for setting itself up.

      Can I translate that to "the class inside the assembly is responsible for constructing itself?"

      I are Troll :suss:

      A 1 Reply Last reply
      0
      • L Lost User

        Aaronov wrote:

        I was thinking that for each sub system I could create a DLL which contained common dialogs, etc that could be used by other programs. The problem I face is that a lot of the dialogs have dependencies on their parent programs MainFrame and I'm not sure how to get around it.

        That will depend on the type of dependency. If it's an enum that get's shared, move it to another library that both the DialogDll and the ParentProgram can access. That could also be done for customized buttons and UserControls - if those have been designed with a separation of UI/data. It it's data that the dialog depends on, I'd suggest using some kind of IPC with the ParentProgram, or calling a webservice that interacts with the ParentProgram's datastore.

        Aaronov wrote:

        though in saying that the DLL should probably be responsible for setting itself up.

        Can I translate that to "the class inside the assembly is responsible for constructing itself?"

        I are Troll :suss:

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

        Yep, that translation is correct. The code that is moved from MainFrame into a class in the DLL is responsible for setting itself up. The dependencies are mostly just basic variables, enums, etc so I think it will work by moving them into a DLL. What's an IPC?

        Richard Andrew x64R 1 Reply Last reply
        0
        • A Aaronov

          Yep, that translation is correct. The code that is moved from MainFrame into a class in the DLL is responsible for setting itself up. The dependencies are mostly just basic variables, enums, etc so I think it will work by moving them into a DLL. What's an IPC?

          Richard Andrew x64R Offline
          Richard Andrew x64R Offline
          Richard Andrew x64
          wrote on last edited by
          #4

          Aaronov wrote:

          What's an IPC?

          Inter-Process Communication Pipes, mailslots, memory-mapped files.....

          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