News for hackers. Stuff that matters.
Re:UIs are not pure functions of the model (2018) by hgsgm on Monday July 04, 2022 @04:14PM (#31981290)
It's not smug to observe that someone ported MVC to JavaScript. It's a lot of work to build.
Re:UIs are not pure functions of the model (2018) by dan-robertson on Monday July 04, 2022 @04:20PM (#31981343)
There were a lot of “MVC in JavaScript” frameworks before react. I don’t think that’s really a useful description of react or of the work or idea involved.
Re:UIs are not pure functions of the model (2018) by phailhaus on Monday July 04, 2022 @07:32PM (#31982772)
Backbone and Marionette were MVC for the web, and they have basically died out. React is a child of the Flux architecture philosophy, also developed by Facebook. [1]

[1] http://fluxxor.com/what-is-flux.html

EDIT: I lied, React came first. Still, they have a lot of similarities, being developed by the same company.

Re:UIs are not pure functions of the model (2018) by acemarke on Monday July 04, 2022 @08:42PM (#31983123)
> React is a child of the Flux architecture philosophy

FWIW, this isn't actually the case.

React was first announced in 2013:

- https://en.wikipedia.org/wiki/React_(JavaScript_library)

The "Flux Architecture" was first announced a year later, in 2014:

- https://youtu.be/nYkdrAPrdcw

React's original influences were things like Facebook's internal PHP-based UI definition layers:

https://reactjs.org/blog/2016/09/28/our-first-50000-stars.ht...

Re:UIs are not pure functions of the model (2018) by wruza on Monday July 04, 2022 @08:12PM (#31983010)
MVC examples in this article do not represent MVC in Cocoa. E.g. last time I checked cocoa tables were bound to array controllers, which controlled filtering, available actions etc. Not to bare models. Older-style cocoa mvc rendering was also based on the view<->controller connection, which may act as a “store” or do something more sophisticated, depending on what you write in delegate methods. These comparison graphs always involve some “head & shoulders” vs “grey regular shampoo” style narrative.
Re:UIs are not pure functions of the model (2018) by mpweiher on Tuesday July 05, 2022 @07:48AM (#31987049)
Well yes: Apple MVC also isn't really MVC. See:

https://blog.metaobject.com/2015/04/model-widget-controller-...

However, sufficiently MVC for the purposes of the post.

Re:UIs are not pure functions of the model (2018) by wruza on Tuesday July 05, 2022 @12:45PM (#31990547)
The article points at issues with “regular MVC” which do not exist in Cocoa way of doing it. So no, not sufficiently.
Re:UIs are not pure functions of the model (2018) by mpweiher on Wednesday July 06, 2022 @05:30AM (#31998634)
None of my articles points at issues with "regular MVC"
Re:UIs are not pure functions of the model (2018) by jonkoops on Monday July 04, 2022 @04:18PM (#31981324)
Except it's not MVC.
Re:UIs are not pure functions of the model (2018) by pier25 on Monday July 04, 2022 @05:33PM (#31981991)
React would be the V in MVC, no?

I mean, even Vue takes its name from that (pronounced "view").

Re:UIs are not pure functions of the model (2018) by lmm on Monday July 04, 2022 @05:56PM (#31982148)
There are no controllers in the react way of doing things, or at least no separation between view and controller if that's your perspective.
Re:UIs are not pure functions of the model (2018) by mpweiher on Monday July 04, 2022 @07:33PM (#31982776)
Well, the role of Controllers in (real) MVC is actually pretty limited.
Re:UIs are not pure functions of the model (2018) by lmm on Monday July 04, 2022 @07:39PM (#31982825)
At that point you're defining MVC so broadly as to be meaningless.
Re:UIs are not pure functions of the model (2018) by mpweiher on Tuesday July 05, 2022 @01:24AM (#31984625)
No, I am using the original definition of MVC.

https://folk.universitetetioslo.no/trygver/themes/mvc/mvc-in...

Re:UIs are not pure functions of the model (2018) by jnash on Tuesday July 05, 2022 @01:56AM (#31984815)
The React architecture is very different from MVC.