Re:Ask HN: Why did Frontend development explode in complexity?
by marcosdumay on Monday January 02, 2023 @11:05AM
(#34219409)
It doesn't help that there are dozens of different definitions of MVC running around. The very clearly uses one that is different from yours.
The thing is that, whatever definition you use, you should have almost all of your code in one of those layers, a small minority on another, and shouldn't even remember exactly how to change the other (unless you start many projects). If that's not the case, your code architecture is working against you.
Re:Ask HN: Why did Frontend development explode in complexity?
by jim180 on Monday January 02, 2023 @11:44AM
(#34220027)
Agreed on that controllers are often misunderstood. I saw them to become both: a view and a model at the same time. :(
Re:Ask HN: Why did Frontend development explode in complexity?
by mpweiher on Monday January 02, 2023 @01:29PM
(#34221640)
What's important to realise is that the elements in MVC are roles not entities.
So for example Views in Cocoa actually fulfil both the View and (largely) the Controller role.
Which is why ViewControllers confused me greatly when they came out. Like they confuse most of the Apple-ecosystem code out there these days. While I do understand how they got there, that doesn't make it better...
But MVC? That's pretty minimal in terms of what you're going to do anyway if you have functionality (model) and will be interacting with it (view). Controllers are often misunderstood, and in the case of Apple massively misapplied (Massive View Controllers).