9 comments

[ 2.5 ms ] story [ 31.7 ms ] thread
I thought this was a very interesting and thoughtful article. I appreciated that the article linked to Trygve Reenskaug's earliest article about MVC, since the real MVC vision and history is unfortunately not well-known today. But the article also seems to take the idea of separation of concerns a bit farther than Reenskaug himself did: the article "The Model-View-Controller (MVC): Its Past and Present" points out that "in simple cases, the Model, View and Controller roles may be played by the same object. Example: A scroll bar." (http://folk.uio.no/trygver/2003/javazone-jaoo/MVC_pattern.pd...)

However, I definitely agree that a framework that steers programmers toward always combining M,V, and C behaviors in a single component (as React arguably does) is highly problematic.

I highly recommend the link to the MVC pattern article above that explains some of the lost history and greater significance of MVC beyond just "separation of concerns". The core of MVC is much more human-focused: it's about better bridging the gap between the user's mind and the computer, so that the Model feels like an extension of the user's mind as they're using the system.

Note: Somebody posted a link to this article in a comment in an earlier thread (https://news.ycombinator.com/item?id=10606482) but I thought I'd create a new thread about it because although it was written last year, I think it deserves further discussion.

The article is fucking crazy.

Web apps and software in general should be about separations of concerns not technologies.

When in React you define the structure + the events your component can receive you are wrapping up that concern nicely in a component.

And BY NO MEANS React is solving any data modeling problem, conversely, they have left that part out of the scope of React and some REALLY NICE options have come out. The most famous is Redux.

And by the way React is not a framework is just a library.

I had some other doubts about the article as well, but didn't make any other comments yet because I am still researching React and web components. It appears you may be right that React does not force you into an overly coupled design, but I still think the article makes a good point about how people are writing React components (among many other library-specific component libraries) instead of native web components, which may be contributing to web components lagging behind. But I was just reading that web components can be used quite successfully as building blocks for larger React components or integrated with React in other ways, so I don't see why it has to be one or the other. And yes, sorry to call React a framework - I know it's a library and should not have called it a framework.
Technology is a meritocracy and I use React because I find it to be a really great way to develop front end apps. It makes sense and it's simple and works really really well. I'm not trading that for some other unproven technology on the basis of ideology. If you want the web to be something else then make it so compelling that I must use it. That's what react did.
Here's another article on why web components deserve a second look, even for React programmers: https://medium.com/@richardanaya/web-components-why-you-shou....

The author also wrote a library that simplifies using web components and offers an option for integrating with React: https://github.com/richardanaya/webblock/ (Haven't investigated it in detail yet, but it looks promising.)

Self-contradicting tripe that plays leapfrog with spurious, tenuously connected points. Accusations of flawed design with promise of exposition go nowhere but steam-blowing and apparent confusion with what exactly React provides, even what a framework is.

Then he goes all weird and starts dropping some projection/social "critique" on Facebook and Google, more spitballing and misunderstanding the React ecosystem (as another HN poster pointed out, React on its own is far from opinionated - the author's notion that React tries to "tightly couple presentation, behavior, and data." is patently false.)

Also, a part of the beauty with both React and Angular are access to the healthy ecosystems of interchangeable components.

Sorry pal, if you were looking to rustle webdev jimmies, then "Sad State of Web Development" this is not.

One of the authors here: we've had some internal debate on this since that article was written, summarized here:

https://www.pandastrike.com/posts/20160331-facebook-react-pa...

Technically speaking, with respect to the whole argument that React is “just a library,” part of the problem is that it isn't perceived that way by many developers. The first auto-complete option (for me anyway) when I type “Web Components vs…” is React.

That said, the developer experience around Web Components is meh. Part of our frustration is that it would have been cool to see Facebook invest all the effort into Web Components-based technologies instead of going off on their own.