Some design questions

Discussion in 'C++' started by tobias.sturn@vol.at, Jun 17, 2006.

  1. Guest

    Hi everybody!

    I have some design questions and i would be very interessted what you
    think?

    - Where, when and who should create the gui, guicontroller,
    usecasecontroller, domainlayer, db in a layer architecture?

    - what should be the the responsabilities of the usecase controller and
    the guicontroller?

    - Would it be good if the usecasecontroller comunicated directly with
    the persistence layer?

    - Why should i dont let the gui communicate directly with the
    persistence layer?

    Thanks a lot!!!
     
    , Jun 17, 2006
    #1
    1. Advertising

  2. Phlip Guest

    [follow-up set to comp.software-eng]

    wrote:

    >
    > Hi everybody!
    >
    > I have some design questions and i would be very interessted what you
    > think?
    >
    > - Where, when and who should create the gui, guicontroller,
    > usecasecontroller, domainlayer, db in a layer architecture?


    The team should. Specifically, those things should start as tiny
    functions, and the team should integrate them all first, forming a
    round-trip application. And only then should team members add features to
    each step.

    That technique is called a "spike solution". Imagine taking a layer cake,
    and sticking a railroad spike through its layers. The spike represents the
    first code you write - it spikes down through all layers, and only does a
    little bit in each layer. A GUI with only one button, for example.

    The rest of the cake represents the team adding features to each layer.
    Yet each feature may require edits in more than one layer. Team members
    should own features, not layers, and should know how to work on each layer.

    > - what should be the the responsabilities of the usecase controller and
    > the guicontroller?


    There's no such thing as a "usecase controller". If you mean
    Model-View-Controller, their responsibilities are to observe each other
    using the Observer Design Pattern.

    > - Why should i dont let the gui communicate directly with the persistence
    > layer?


    Encapsulation is hierarchical. That means the further the conceptual
    distance between two program modules, the narrower their communication
    should be.

    Ideally, a change in one place should not require changes in too many
    other places. You should be able to add GUI controls without adding
    database fields, and vice versa. Plugging a GUI directly into a database
    often prevents you from changing one without changing the other.

    --
    Phlip
     
    Phlip, Jun 17, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    0
    Views:
    710
    Guest
    Feb 25, 2004
  2. Eric
    Replies:
    2
    Views:
    1,568
    Tommy
    Feb 13, 2004
  3. Dave
    Replies:
    2
    Views:
    564
    Steven Cheng[MSFT]
    Nov 22, 2004
  4. mimi
    Replies:
    3
    Views:
    301
    Nick Keighley
    Mar 7, 2007
  5. Replies:
    3
    Views:
    1,013
    Al Balmer
    Jan 11, 2008
Loading...

Share This Page