frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

UIs Are Not Pure Functions of the Model – React.js and Cocoa Side by Side (2018)

https://blog.metaobject.com/2018/12/uis-are-not-pure-functions-of-model.html
37•PKop•3d ago

Comments

azangru•3h ago
> When I first saw React.js, I had a quick glance and thought that it was cool, they finally figured out how to do a Cocoa-like MVC UI framework in JavaScript.

> Overall, though, the use of a true MVC UI framework seemed like a great step forward

The author keeps saying 'MVC' as if it ever made any sense in the context of React. The old react docs used to quip that react was the v of mvc, until this notion was scraped entirely; and although one might perhaps suggest that props and templating is a v, and state is conceivably an m, there has never been anything concrete one could point out and argue that it is a c.

DanielHB•1h ago
It is funny that MVC as a concept started as a backend server-rendered pages where the V was what rendered the HTML, C was the business logic which pulled data from the M which was the database + adapters.

When bending it to apply to React + JSON-apis it kinda applies, but it is such a different approach that conceptually it is not relevant in the presence of a lot of client state.

phil-martin•1h ago
It started waaaaay before backend server-rendered pages

https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93con...

"Trygve Reenskaug created MVC while working on Smalltalk-79 as a visiting scientist at the Xerox Palo Alto Research Center (PARC) in the late 1970s. He wanted a pattern that could be used to structure any program where users interact with a large, convoluted data set. His design initially had four parts: Model, view, thing, and editor. After discussing it with the other Smalltalk developers, he and the rest of the group settled on model, view, and controller instead."

lelanthran•58m ago
> It is funny that MVC as a concept started as a backend server-rendered pages where the V was what rendered the HTML, C was the business logic which pulled data from the M which was the database + adapters.

I've got a CD from 1995 for Watcom C/C++. I purchased this compiler and IDE for a large (for me) sum of money and used it to create many Win32 applications.

I recall that that the help pages (which were extensive) came along with some non-reference documentation, which gave a quick overview of MVC for writing Win3.1 and Win95 applications, so MVC was already well-known in GUI systems even back then.

dsego•41m ago
The server-based MVC pattern adopted in Rails is not the original one described for use in interfaces, it could be considered a misinterpretation.

https://andrzejonsoftware.blogspot.com/2011/09/rails-is-not-...

https://news.ycombinator.com/item?id=3035549

A model is supposed to be a domain model, the business logic of the app, not simply a database access layer. Your logic should reside in the model layer, sort of like building a library of classes and functions that you can reuse. That's why in the server-side world people use the term "fat models" to describe this type of use.

> When bending it to apply to React + JSON-apis it kinda applies

There is no bending, the original MVC applied to separating the business logic from rendering views and capturing input events, because this separation promotes code reuse. You can write many different views and controllers in your UI that show and react to user's input but still talk to the same underlying logical model.

I like this github repo to understand how MVC applies to programs with graphical interfaces. It's JS and HTML, so it's easy to follow.

https://github.com/madhadron/mvc_for_the_web/tree/master

bloomca•1h ago
React is not pure at all, and has a few gotchas related to updates. That being said, the JSX and composability of it is unmatched and I think the main reason React "won".

I think a logical continuation of this model is something like Solid.js, where there is no concept of re-rendering, just atomic DOM updates when observables change their values, but somehow this approach didn't get critical traction.

greener_grass•55m ago
It exists, but as a Haskell library called Reflex. This is why it didn't gain traction ;)
bsaul•28m ago
Is there a trend of new web framework that try to go back to actually using classes / objects instead of functions to build UI components ?
boxed•26m ago
In Elm the UI is 100% pure, and they are super adamant that local state is evil and a mistake. They sort of get away with it because there is already hidden state like input focus/selection, or scroll positions. But it's pretty clear that it's not practical to do full purity without local state in reality.

AWS to bare metal two years later: Answering your questions about leaving AWS

https://oneuptime.com/blog/post/2025-10-29-aws-to-bare-metal-two-years-later/view
92•ndhandala•1h ago•41 comments

Keep Android Open

http://keepandroidopen.org/
1179•LorenDB•8h ago•318 comments

Who needs Graphviz when you can build it yourself?

https://spidermonkey.dev/blog/2025/10/28/iongraph-web.html
233•pdubroy•7h ago•37 comments

What we talk about when we talk about sideloading

https://f-droid.org/2025/10/28/sideloading.html
1251•rom1v•18h ago•505 comments

Tips for stroke-surviving software engineers

https://blog.j11y.io/2025-10-29_stroke_tips_for_engineers/
271•padolsey•8h ago•76 comments

ChatGPT's Atlas: The Browser That's Anti-Web

https://www.anildash.com//2025/10/22/atlas-anti-web-browser/
437•AndrewDucker•4d ago•182 comments

uBlock Origin Lite Apple App Store

https://apps.apple.com/in/app/ublock-origin-lite/id6745342698
210•mumber_typhoon•8h ago•91 comments

EuroLLM: LLM made in Europe built to support all 24 official EU languages

https://eurollm.io/
692•NotInOurNames•21h ago•518 comments

SpiderMonkey Garbage Collector

https://firefox-source-docs.mozilla.org/js/gc.html
25•sebg•3h ago•0 comments

Continuous Nvidia CUDA Profiling in Production

https://www.polarsignals.com/blog/posts/2025/10/22/gpu-profiling
24•brancz•6d ago•0 comments

Tinkering is a way to acquire good taste

https://seated.ro/blog/tinkering-a-lost-art
327•jxmorris12•14h ago•245 comments

UIs Are Not Pure Functions of the Model – React.js and Cocoa Side by Side (2018)

https://blog.metaobject.com/2018/12/uis-are-not-pure-functions-of-model.html
37•PKop•3d ago•9 comments

Boring is what we wanted

https://512pixels.net/2025/10/boring-is-what-we-wanted/
360•Amorymeltzer•16h ago•204 comments

YouTube is taking down videos on performing nonstandard Windows 11 installs

https://old.reddit.com/r/DataHoarder/comments/1oiz0v0/youtube_is_taking_down_videos_on_performing/
203•jjbinx007•2h ago•172 comments

Wacl – A Tcl Distribution for WebAssembly

https://github.com/ecky-l/wacl
54•shakna•7h ago•2 comments

Generative AI Image Editing Showdown

https://genai-showdown.specr.net/image-editing
267•gaws•15h ago•50 comments

Powerful and precise multi-color lasers now fit on a single chip

https://phys.org/news/2025-10-powerful-precise-multi-lasers-chip.html
41•PaulHoule•4d ago•14 comments

Apple will phase out Rosetta 2 in macOS 28

https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
188•summarity•5d ago•212 comments

Keeping the Internet fast and secure: introducing Merkle Tree Certificates

https://blog.cloudflare.com/bootstrap-mtc/
159•tatersolid•13h ago•45 comments

The AirPods Pro 3 flight problem

https://basicappleguy.com/basicappleblog/the-airpods-pro-3-flight-problem
441•andrem•21h ago•238 comments

HTTPS by default

https://security.googleblog.com/2025/10/https-by-default.html
229•jhalderm•18h ago•207 comments

Project Shadowglass

https://shadowglassgame.com
98•layer8•11h ago•34 comments

Fil-C: A memory-safe C implementation

https://lwn.net/SubscriberLink/1042938/658ade3768dd4758/
232•chmaynard•18h ago•77 comments

Nvidia takes $1B stake in Nokia

https://www.cnbc.com/2025/10/28/nvidia-nokia-ai.html
245•kjhughes•20h ago•158 comments

Gluing and framing a 9000-piece jigsaw

https://river.me/blog/puzzle-glue-9000/
59•busymom0•3d ago•28 comments

Wheeled Inverted Pendulum Model

https://scaron.info/robotics/wheeled-inverted-pendulum-model.html
6•pillars•4d ago•1 comments

We need a clearer framework for AI-assisted contributions to open source

https://samsaffron.com/archive/2025/10/27/your-vibe-coded-slop-pr-is-not-welcome
265•keybits•1d ago•141 comments

Why do some radio towers blink?

https://www.jeffgeerling.com/blog/2025/why-do-some-radio-towers-blink
161•warrenm•16h ago•104 comments

The decline of deviance

https://www.experimental-history.com/p/the-decline-of-deviance
216•zdw•20h ago•183 comments

It's insulting to read AI-generated blog posts

https://blog.pabloecortez.com/its-insulting-to-read-your-ai-generated-blog-post/
1118•speckx•1d ago•498 comments