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. GRASP: Controller architecture, correct and wrong.

GRASP: Controller architecture, correct and wrong.

Scheduled Pinned Locked Moved Design and Architecture
questiondatabasegraphicsdesignbusiness
4 Posts 2 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.
  • G Offline
    G Offline
    grmihel2
    wrote on last edited by
    #1

    I've developed on an application for quiet long now, and it consist of 2 sub systems, 1 for Marketing and 1 for Management. They have an seperated DB each. Now I have an UI that have to pick information in both databases, and I wondered if my controller pattern was correct, since I somehow got the idea that a UI that have connection to both Controller Facades, must be somehow incorrect? My original setup was like this:

          \[UI\]
    

    ------Controllers------

     \[Business Logic\]
    

    ------Datacontext------

    MarketingDB | ManagementDB

    I don't know if it give you any sense? The controller on the drawing consist of the 2 controllers described above. Would it be right to make an on-top controller and call that one FrontController, so ALL UI's are connection to the FrontController no matter if they are Marketing UIs or Management UIs? Imo that gives you the ultimate of low coupling between UI and business layer, and lowest coupling between the Controllers and the UI layer, but I don't know if this is 'correct' or wrong? What is your oppinion??? I have two drawings to show the concept I wanted to do: http://img192.imageshack.us/i/controllerdomaincontrol.jpg/[^] ONLY FrontController: http://img62.imageshack.us/i/controllerfrontcontroll.jpg/[^] Which one would you prefer as correct architecture? And why?

    P 1 Reply Last reply
    0
    • G grmihel2

      I've developed on an application for quiet long now, and it consist of 2 sub systems, 1 for Marketing and 1 for Management. They have an seperated DB each. Now I have an UI that have to pick information in both databases, and I wondered if my controller pattern was correct, since I somehow got the idea that a UI that have connection to both Controller Facades, must be somehow incorrect? My original setup was like this:

            \[UI\]
      

      ------Controllers------

       \[Business Logic\]
      

      ------Datacontext------

      MarketingDB | ManagementDB

      I don't know if it give you any sense? The controller on the drawing consist of the 2 controllers described above. Would it be right to make an on-top controller and call that one FrontController, so ALL UI's are connection to the FrontController no matter if they are Marketing UIs or Management UIs? Imo that gives you the ultimate of low coupling between UI and business layer, and lowest coupling between the Controllers and the UI layer, but I don't know if this is 'correct' or wrong? What is your oppinion??? I have two drawings to show the concept I wanted to do: http://img192.imageshack.us/i/controllerdomaincontrol.jpg/[^] ONLY FrontController: http://img62.imageshack.us/i/controllerfrontcontroll.jpg/[^] Which one would you prefer as correct architecture? And why?

      P Offline
      P Offline
      Piccadilly Yum Yum
      wrote on last edited by
      #2

      I prefer front controller because by adding a layer you can abstract your sub controllers and stimulating immagination

      Piccadilly Yum Yum

      G 1 Reply Last reply
      0
      • P Piccadilly Yum Yum

        I prefer front controller because by adding a layer you can abstract your sub controllers and stimulating immagination

        Piccadilly Yum Yum

        G Offline
        G Offline
        grmihel2
        wrote on last edited by
        #3

        But won't it just be another class class with duplicated code, containing all the method's from sub-controllers? Or are there any smart way to do it?

        P 1 Reply Last reply
        0
        • G grmihel2

          But won't it just be another class class with duplicated code, containing all the method's from sub-controllers? Or are there any smart way to do it?

          P Offline
          P Offline
          Piccadilly Yum Yum
          wrote on last edited by
          #4

          It depends on what is the job of controllers, your architecture is not the only possible, i post a fragment from wikipedia about architectures : Architecture description languages Architecture description languages (ADLs) are used to describe a Software Architecture. Several different ADLs have been developed by different organizations, including AADL (SAE standard), Wright (developed by Carnegie Mellon), Acme (developed by Carnegie Mellon), xADL (developed by UCI), Darwin (developed by Imperial College London), DAOP-ADL (developed by University of Málaga), and ByADL (University of L'Aquila, Italy). Common elements of an ADL are component, connector and configuration.

          Piccadilly Yum Yum

          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