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
MVC Isn’t MVC
11–20 of 165 posts
Re: MVC Isn’t MVC
#12If 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
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.
Re: MVC Isn’t MVC
#13Responsive 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...
Re: MVC Isn’t MVC
#14[1] https://github.com/facebook/react/tree/015833e5942ce55cf31ae...
Re: MVC Isn’t MVC
#15Fun fact: React was originally designed to be used as the 'V' in MVC [1]. [1] https://github.com/facebook/react/tree/015833e5942ce55cf31ae...
Re: MVC Isn’t MVC
#16Fun fact: React was originally designed to be used as the 'V' in MVC [1]. [1] https://github.com/facebook/react/tree/015833e5942ce55cf31ae...
It still can be! A client-side app that talks to an API is still the V. Obviously many apps get elaborate with client-side state, but you don’t have to!
Re: MVC Isn’t MVC
#17If 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
I'm not seeing it.
From TFA:
> Views: A visual representation of a model. Views are updated by querying the model directly, and are notified by the model of updates. A view can update it’s model directly. A view should never know about things like keyboard and mouse events directly.
I'd like to emphasise the "a view can update its model directly" part - which is exactly what Redux and React are designed to prevent: when logic in a view can mutate the model (especially when the view _also_ depends on update notifications from the model to update itself) things get impossible to reason-about.
Instead, Redux/React is designed to force the view to "update" the model indirectly via actions and reducers.
Another tenet of Redux+React is that the model ("state" in Redux/React) is an immutable object-graph which is replaced on every update, whereas "classical" MVC requires a mutable, long-life'd model.
I feel the similarities only exist if you squint - and if you're lumping TFA's idea of MVC with React (and MVVM (groan...)) as ideas in opposition to how most people wrote/write RAD/VB6/WinForms by directly subclassing controls and overriding message-pump event-handler methods, which (I hope) everyone will agree is an approach that doesn't scale beyond building throwaway UIs.
Re: MVC Isn’t MVC
#18> In December of 1979 _Tyrgve Reenskaug_, an employee of _Xerox PARC_
Later
>In 2004, a Danish man
Re: MVC Isn’t MVC
#19The MVVM pattern, originally designed by MSFT for Silverlight, showed a way that basically cleaned up a lot of the issues with MVC.
That is what SwiftUI uses today, MVVM, as you can compare with his diagram of what he calls "Apple's MVC" and this diagram from MSFT: [1].
In fact, I'd go out on a limb and say that no one really uses MVC today - in its pure original form.
[1] https://learn.microsoft.com/en-us/dotnet/architecture/maui/m...
Re: MVC Isn’t MVC
#20If 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
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.