Hacker News new | ask | show | jobs
by petilon 1119 days ago
There is no two-way data binding in use here, so you're wrong.

The style used is MVC. Do you think MVC is not suitable for multi-person teams? If so how do you explain MVC in Cocoa, ASP.NET Core, JSP and JSF, Ruby on Rails, and Django (Python)? They are all based on MVC.

1 comments

> There is no two-way data binding in use here, so you're wrong.

Cyclical data bindings and two-way data bindings are fundamentally different issues. Not knowing the difference makes it pretty clear you haven’t lived through a codebase that had these types of issues.

MVC seems great in sprit and breaks down at the first real interactive, stateful usecases.

> Do you think MVC is not suitable for multi-person teams? If so how do you explain MVC in …

Correct, I do not find MVC suitable for multi-person teams. You won’t believe me, but it is an incomplete abstraction that was previously relied on but since React and also modern video game engines it is no longer in favor.

Why is it still used by all those legacy frameworks? Because, frankly, they are old and haven’t evolved.

Apple has moved on from Cocoa to SwiftUI. Java devs have all but moved on from JSP (goodness those days were terrible). Rails for all its awesomeness has been stuck for years not able to move past itself and typically now paired with React or Vue.

MVC was a good stepping stone, but now we have learned and we are moving on!

Sorry none of this makes any sense to me. You can't have cyclical data binding when you only have 1-way data binding. MVC is absolutely perfect for stateful use cases. In fact, it is React that suffers a total breakdown in stateful use cases. If your component is stateful and you need to update props then the recommendation is to set and change a key, which replaces the component with a new instance. This of course eliminates any benefit that React provides.
I'll try one last time:

> Sorry none of this makes any sense to me.

If you're not familiar with the MVC variants (MVVM, MVP, MVI, MOVE)[0][1] we should start there.

Next you should read through some common mistakes of Backbone.js like applications https://www.toptal.com/backbone-js/top-8-common-backbone-js-... and some criticisms of MVC on HackerNews in 2012[0].

Finally if you haven't before these talks, they are the ones that sold me on React:

- https://www.youtube.com/watch?v=-DX3vJiqxm4

- https://www.youtube.com/watch?v=DgVS-zXgMTk

- https://www.youtube.com/watch?v=nYkdrAPrdcw&t=203s

[0] https://medium.com/@pinarkocak/mvc-mvp-and-mvvm-design-patte...

[1] https://news.ycombinator.com/item?id=4189811

Sorry your last attempt failed. If you have been following React discussions on HN you know there's massive criticism about hooks. MVC is still the predominant pattern and for very good reason. Backbone.js is not relevant for this discussion.