:: Re: [DNG] Why MVC: was Why C/C++ ?
Top Page
Delete this message
Reply to this message
Author: Steve Litt
Date:  
To: dng
Subject: Re: [DNG] Why MVC: was Why C/C++ ?
Olaf Meeuwissen via Dng said on Sun, 18 Aug 2024 17:56:52 +0900

>While I agree that view and controller are typically highly coupled, it
>does make sense to separate them as much as possible.
>
>An application may need to represent information in a number of
>formats, e.g. PDF, HTML, JSON, YAML and text/plain. You probably want
>to separate out the nitty gritty formatting in a different
>implementatioin for each with a common base View. That way, the
>common base is the only thing that couples tightly with the Controller.
>
>Hope this helps,


Hi Olaf,

I wish it helped, but it doesn't help me. Questions:

1. What is the definition of a Model?

2. What is the definition of a View?

3. What is the definition of a Controller?

4. Can/should there be multiple instances of Model and/or View and/or
Controller?

5. How can one know for sure whether a piece of code should go in the
Model, the View, or the Controller? As I look at MVC examples on the
Internet, I see quite a bit of variation as to where pieces of code
should be placed.

I see all sorts of contradictory answers to the preceding questions all
over the Internet. And on the Internet I see a lot of MVC volleyball
code leading to design difficulty, debugging difficulty, maintenance
difficulty, and feedback loops.

SteveT

Steve Litt

http://444domains.com