3 ms·
I was deliberately vague in my post about which to choose. There's surely something worth learning from every major UI toolkit in common use today. I'd say all
by TheTon 5y ago
I was deliberately vague in my post about which to choose. There's surely something worth learning from every major UI toolkit in common use today. I'd say all the bad ones I've used have something in common: they were all written by people who never grokked a good UI toolkit before setting off and writing their own. But learning from them what not to do is useful too!
I personally have learned the most from Cocoa, but systems like React and Dear ImGui have definitely shown me new ways to think recently.
In terms of contrasting what's strong vs weak, look at how Cocoa changed from AppKit to UIKit. They kept a lot of the same ideas: such as runloops, target/action, view hierarchy, and the responder chain, but did away with some things that were redundant (NSCell) or poorly suited to producing fluid UIs (timer based animations). Put another way, they improved composability (everything is a view as opposed to some things being views, others cells, and others still windows), and they introduced a new low level system in CoreAnimation that provided compositing and animation and made it a fundamental building block.
---
An unpopular opinion I hold is that a good API design is more important than source code. Like, pick any method on UIView: strong Cocoa programmers could write a workable implementation given just the method signature and the documentation if they had to. The design of the API and how it all fits together is the real magic. Once you get that, the implementation follows. ... on the other hand, Microsoft actually tried to do that once, and their implementation was bad: https://github.com/microsoft/WinObjC/tree/develop/Frameworks/UIKit https://github.com/microsoft/WinObjC/tree/develop/Frameworks...