Outside of web-based technologies, what would you consider a "desirable option" for making UIs?
I don't think Apple developers have the experience to see how far behind SwiftUI is and how little chance there is of them catching up, and I don't think non-Apple developers have the experience to see there's very little 'special' to ObjC or Swift.
I’d agree at least that platform-specific developers can often keep themselves far too isolated. They really should be making an effort to work cross-platform as much as possible, because learning about the different patterns and techniques used in different environments is an incredible force multiplier.
Such as?
In any case, I'd assume those miles are only gained on iOS where Apple has gimped the newer web APIs.
Picking some features I like entirely at random: libdispatch, Core Data, comprehensive accessibility support, SpriteKit, Core Video, ARKit… basically, there are lot of powerful and reasonably consistent APIs (with good performance) that really make a bunch of development much more tractable. Some of these can be replicated on the web platform; others can't.
In any case, I'd assume those miles are only gained on iOS where Apple has gimped the newer web APIs.
I'm sure you appreciate why that kind of attitude is a bit silly and serves to demonstrate the exact effect I was initially talking about.
The rest looks like it's focused on graphics/stuff you wouldn't do on the web anyway - yes, the fact it's impossible on the web _means by definition Apple is miles ahead_, but claiming Apple is overall miles ahead on dev experience because of AR and video bitstream manipulation APIs is a bit blinkered, given very few developers get to use those APIs.
Those are not features. Those are names of developer libraries.
What do you think they can do that's so much better?
> I'm sure you appreciate why that kind of attitude is a bit silly...
Apple clearly nerfs the web on iOS and there's nothing silly about acknowledging that. It's actually kinda silly pretending that they don't xD
> and serves to demonstrate the exact effect I was initially talking about.
Hmm, that's not very clear at all. You said "platform-specific developers can often keep themselves far too isolated", but the web isn't "platform-specific" it's 100% cross-platform and that's why Apple hates it.
The web has no APIs for this. Instead laziness is tacked on through JS, and invariably breaks find, scrolling, etc. Try scrolling to the bottom of your Chrome history: the scrollbar jumps and it's often not clear if/when you reach the bottom.
iOS has scrollbar jumps unless you know the rendered height of every list item and the complete count of list items in advance (which is why Chrome jumps, it doesn't know the entire length of your web history, it's loading it in batches)
Funnily enough, _SwiftUI doesn't support lazy table views_. Seriously. It's nuts.
I do not agree that the JS implementations have "solved" lazy tables: they're all invariably broken. For example if you hit cmd-A to Select All, Chrome history just selects what is faulted in. If you scroll down eventually you find unselected items. Safari doesn't have this problem and the main reason is its use of native tables instead of web tables.
I agree this is a big hole in SwiftUI as well. A lazy table requires cooperation between the framework and the app, which is an awkward fit for declarative UI frameworks like SwiftUI and the web.
It's not at all representative of the experience of using Gmail, Ymail, Hotmail. The web requires heroics to get quality.
macOS accessibility features alone have generally been light years ahead of Windows, for over a decade.
One such example is menus. Just about all Mac apps — even ported stuff using third party UI toolkits — hook into the standard menubar APIs, which means that every menu item of every app can have a key shortcut assigned (or reassigned) in System Preferences, even when the app's dev never bothered to add such configurability. Similarly, accessibility and scripting APIs can reliably grab the menu items of any app, improving automation and interoperability. One could probably even write a full replacement for the macOS global menubar without much fuss.
Compare this to Windows and Linux where it's quasi-normal for apps to implement menus their own way or eschew them altogether — there is no single way to grab menu items, just a ton of different possible ways, and if an app dev has decided to do their own thing you're just SoL.
- Flutter is the runaway winner, in general
- ARC looks like a mistake in retrospect - you trade 'GC overhead' for memory leaks
- keeping autolayout _and_ absolute frames looks like a mistake: a significant portion of SwiftUI overhead is spent in autolayout
- after working with Swift and _loving_ it between Swift 1 and 4, seeing the issues and watching Apple staff up and get more rigorous to solve them, stapling SwiftUI right now is unconsciable
- it requires contorting the language spec and the slow speed removes the one benefit of all the other frameworks, hot reload on device.
- Apple seems confused because they can _enumerate tractable work that would improve SwiftUI_, but the sum of that work is large enough to place a real, performant, cross platform Swift UI O(years) out (c.f. Swift's stable ABI clusterfoo)
How did people make iOS/macOS apps before SwiftUI? i.e. before 2020?
The idea of frame hierarchy is much more concrete in the autolayout world - which I guess helps the most.
Or one of the various alternatives... Flutter, React Native, Cordova, maybe a few others. There are also game app engines for games and game-like apps).
There are definitely fewer decent alternatives than for the web, but you aren't exactly starved.
Also, the context here is bug fix release cycles... no matter what you choose there will be bugs and release cycles that don't always match what you want for your app.
This is even true for script languages for instance. This is what make Javascript or Python more powerful than the language let them be. Being able to 'fallback' to C if things are not working the way they should.
Having SwiftUI or React are ok, if you can call imperative UIKit api's or web DOM when you need it.
Im very skeptic that this model will be feasible for the more "hardcore" cases of applications. So its important to have a powerful way to control things in details.
In hindsight, the modularity and the power that the web UI api gives you today is something to admire.
Its hard to have other examples where the bazar model ended up with better tools than the cathedral model. Especially if the cathedral model had time to do it later with the technological advantage only experience gives you.
Developing GUIs in various form factors since the late 80's and I rather have a window context to draw whatever I need than faking menus with list items.
Project Houdini, WebGL + Web Assembly for the second coming of Flash alike tooling is thankfully already taking off.
Sure, they're technically building on top of the native UI frameworks, but only by completely ignoring all of their functionality.
https://developer.apple.com/library/archive/documentation/Co...
UIKit/AppKit is layered on top of Core Animation which is layered on top of Metal. Skia, the 2D graphics library that Chrome's rendering engine uses, is built on top of Metal (or at least transitioning to Metal from OpenGL on macOS).
So browsers have the same flexibility in principle as native UI toolkits and they are just as close to the metal. There is no inherent disadvantage. But flexibility is a double edged sword. It includes the ability to diverge from the platform look & feel. So that's where the debate has been raging on for decades.
In terms of performance I think any debate about optimisation of UI stacks pales in comparison to the question of where the data lives, who generates it, and how it gets to the CPU/GPU for processing and display.
If people want to use web technologies on the desktop, there is Electron.
The converse is not true.
Quite a few of the ‘cross platform’ toolkits work this way.
Instead of waiting for Apple to fix SwiftUI, it's completely viable to bring your own abstractions, from React to Reason to Elm, to the web. And the cottage community that works on the most niche web abstraction is bigger than the Apple team allocated for SwiftUI.
It has its downsides, and sometimes we're all too eager to beat the drum of how bad the web can be, but it's also important to recognize the web as a fluke of history where we still have some control.
That said, I give Apple some credit for moving their own platform forward in a way that clearly borrows from what we've been doing with things like QML and React. I look forward to the day when my SwiftUI apps work well on both macOS and iOS. And it will be interesting if we reach a point where we don't need UIViewRepresentable because APIs like WKWebView have been adapted for the new declarative model.