[Oberon] blackbox model view controller

Srinivas Nayak sinu.nayak2001 at gmail.com
Wed Nov 9 12:31:12 CET 2016


> Aside: I'm a bit of a critic/skeptic of "model view controller", as I find
> for example, html template engines which claim to be MVC, are actually
> violating MVC; as some code always ends up infecting the model and view
> which should have been in the controller.

In my experience I have seen two types of MVC.

One in native apps, say a C++ desktop app using wxWidget framework.
Other in web apps, as Lars said, in html template engines.

In native apps, View directly contacts Model to get current state.
In web apps, View never contacts Model. Here Controller is the middle man.

Though literature talks about MVC as used in native apps,
I don't know, why in web apps, View never contacts Model.

> I think MVC is a good theoretically pure concept, but is often impure in
> practice, still definitely worth pursuing even if impure in final form.
> At least my experience with MVC in template engines for html is that often
> logic and code ends up in the html template, when supposedly it all is to
> be in the controller. But as for how impure mvc relates to component
> pascal, I will have to use it more to find out if violations occur.

I think, as seen in literature, most of the business logic should be within Model.
And Controller should only have the logic to translate input to Model understandable format
and output to View understandable format.



With thanks and best regards,

Yours sincerely,
Srinivas Nayak

Home: http://www.mathmeth.com/sn/
Blog: http://srinivas-nayak.blogspot.in/


More information about the Oberon mailing list