Re: Model View Controller basics.

From: Universe (no email)
Date: 09/12/04


Date: Sun, 12 Sep 2004 11:18:08 -0400

Robert C. Martin <unclebob@objectmentor.com> wrote:

> On Sat, 11 Sep 2004 18:57:53 +0200, "Val"
> <valmont_programming@hotmail.com> wrote:
>
> >Goodday everybody.
> >
> >I'll need to learn to seperate my view(s) from everything else by now. I
> >don't have the skills to do so. So I've googled around to find the basics
> >about the MVC. For Java there is plenty
> >but nothing at all for C++. Not for hobby-coders like me -with mediocore C++
> >skills that is. Note that the GoF site doesn't demonstrate MVC (that's not
> >covered in their book). But they provide a link to a non-software example.
> >That is no good to me. No class diagram is shown, nor a sequence diagram.
> >I'd like someone to help me set up a
> >"do-nothing-console-toy-skeletonprogram" so I can finally move on.
> >I know that is a lot to ask. If you don't think that is the way to do it
> >then please would you like to guide me if I present a little case so I can
> >learn?

The specific terminology "MVC" is came out of and is closely related
to the how systems developed using the Smalltak IDE, which
incorporates MVC as a fundamental system framework and architecture.

It is laudable that you want to decouple key aspects of your system
this way--separating the concerns of:
        ` how the system handles business object logic - Model
        ` how the system interacts with I/O - View
        ` how the "Model" is coordinated to fulfil use cases - Controller

Kudos! Bravo!

Apart from the using OO abstraction modelling of project scope
relevant business logic, separating the above areas is a definite and
major plus in your battle against complexity as struggle to develop
software that meets use case requirements.

Indeed some of us have coined the term:
        Canonical Design Form - CDF
to refer to structuring OO systems with MVC class separation and
collaboration. [I will try to repost my CDF paper today.]

I think it's to your advantage in tackling your tasks in this area to
take a broader less Smalltalk specific approach by dividing those
concerns into this more widely used OO software engineering arena
schema:
        ` Interface
        ` Entity
        ` Controller

This schema was initially delineated and popularized in the book:

        OO Software Engineering: A Use Case Driven Approach
                        by Ivar Jacobson et al

The text is a summary and exposition of OO best practices and
significantly includes an elaboration of the methodology of use cases,
as well coverage of designing system structure by dividing classes
into Interface, Entity and Controller, by some of its leading
exponents.

Also most of us find that optimal systems result when Model and
especially Coordination of the Model are principally what ultimately
guides, leads and drives key decisions and the nature of the system as
a whole.

Elliott

-- 
Decomposing OO system abstractions into the Controller, Interface,
Entity set among other kinds of sets like - Active/Passive,
BusinessModel/DataModel/UseCaseModel/InterfaceModel, Base/Derived, Etc
and so on - has proven efficacy by being integrated into most optimal
OO system designs.


Relevant Pages

  • Re: GUI in C#
    ... decouple "event-driven programming" from the MVC concept. ... > the controller code sits in the U/I layer, ... even though the pattern is described that way. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: A few questions regarding MVC
    ... circa 1970 version or some modern variation? ... Using the classic MVC archticture as a guide to understanding modern ... controller can take the appropriate actions. ... views are observers <- model ...
    (comp.object)
  • Re: ttk::checkbutton - I think, its a bug
    ... If your implementation of MVC is a View that directly updates the Model, ... So you don't consider the bindings, and the code behind the bindings, ... to be considered a controller? ... what happens if you have a widget for the same data on several ...
    (comp.lang.tcl)
  • Re: MVC in C++
    ... Things are now flowing more along the classic MVC lines. ... > struct Observable ... > string version; ... In that case the Controller would trigger a model update *and it* could ...
    (comp.object)
  • Re: FrontController Design Pattern and Code Reuse
    ... If you can also include a bit of MVC at the same time you can ... "reused" more than any PHP program that exists or may ever exist. ... > the Business layer in 3 Tier) while Lister should exist as a Controller ...
    (comp.lang.php)