[HN Gopher] MVC Isn't MVC
___________________________________________________________________
MVC Isn't MVC
Author : ingve
Score : 19 points
Date : 2023-06-19 22:06 UTC (53 minutes ago)
(HTM) web link (collindonnell.com)
(TXT) w3m dump (collindonnell.com)
| Avlin67 wrote:
| I did long forgot the MVC stuff...
| fredgrott wrote:
| To get anal
|
| If you use any SDK and or framework you do not have MVC
|
| you instead have
|
| framework-SuperController | MVC
| Khelavaster wrote:
| Responsive UI-driven apps these days use MVC backend => frontend
| MVC app context loader => frontend MVVM application layer.
|
| https://learn.microsoft.com/en-us/dotnet/architecture/maui/m...
| bsaul wrote:
| Not sure why author got the impression apple's models had to be
| << dumb data containers >>.
|
| Actually, having dumb models is the surest way to completely
| screw up your controllers design, since you're now left with no
| other places to write your business logic in. This leads to
| either weird trees of controller inheriting each other for the
| sake of reusing some data processing piece, or singletons
| everywhere which makes the code super hard to reason upon, not to
| mention harder to unit test.
|
| My take on the model layer is : write everything that's not
| strictly specific to your UI there.
| misterbwong wrote:
| If you squint a bit, the "original" MVC looks eerily similar to
| the one-way data flow pattern popularized by flux/redux.
|
| https://en.wikipedia.org/wiki/React_(software)#Unidirectiona...
|
| edit: better link
| dfox wrote:
| Indeed, what the various "reactive" frameworks do is in the end
| the idea behind MVC, although as they are web-based the
| implementation is ridiculously complex and the abstraction is
| very leaky.
| scrame wrote:
| the purest mvc demo is pong.
| laurent123456 wrote:
| In many ways it's really just MVC except they renamed the
| elements:
|
| - Dispatcher = Controller
|
| - Store = Model
|
| - View = View
|
| And the actions are the messages sent from the user to the
| controller.
| MrPatan wrote:
| It may be a matter of explaining it differently. Maybe just the
| names! But I never "got" MVC, and I got the one way data flow
| pattern straight away. Maybe I was just old enough to get the
| point that time around.
| breadwinner wrote:
| MVC is one-way. Some people think MVC is two-way data
| binding. That's MVVC actually.
| tracker1 wrote:
| I think flux/redux is generally cleaner imo. But have had a
| tendency to think of it that way. MVC usually feels like
| spaghetti in contrast. And while Redux/Flux takes some mental
| overhead, I see so many fewer side effects in UIs that use the
| approach.
___________________________________________________________________
(page generated 2023-06-19 23:00 UTC)