6 ms·
Building clients on other platforms makes you appreciate the freedom we have on the web. Instead of waiting for Apple to fix SwiftUI, it's completely viable to
by hombre_fatal 6y ago
Building clients on other platforms makes you appreciate the freedom we have on the web.
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.
- gumby 6y agoI agree with your overall point, but you don't need swiftui to develop for the mac/ios.
- dimitrios1 6y agoI agree with your counterpoint, but you don't have many other desirable options.
- Wowfunhappy 6y agoI'm not really a developer myself, but I get the impression there's plenty of long-time Mac developers who like/enjoy making Cocoa apps with Objective-C and Swift, particularly in comparison to doing the same on Windows. Outside of web-based technologies, what would you consider a "desirable option" for making UIs?
- anoncareer0212 6y agoWe do, but, it's mostly because we were raised on it and have a lot of ingroup memes for discrediting other options - my company forcing me to work outside iOS for the first time in several years was a real eye-opener. 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.
- matthewmacleod 6y agoHmm, I don’t recognise this characterisation. I have been a web front-end specialist for quite some time, and have also developed large-scale native UIs for both macOS and iOS. My perspective would be that there is no clear winner. The Apple environment is absolutely _miles_ ahead of the web platform in several respects; the web offers greater flexibility that comes with a corresponding cost. 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.
- pookieinc 6y agoAs someone who is also a front end dev, can you share more? I’ve been getting into Swift development on my free nights, but between the horrendous Xcode IDE errors / lag and learning the ins and outs of a new strongly typed language, it makes me hug my vscode / js environment tighter to my chest
- anoncareer0212 6y agoMaybe I'm conflating 'web framework' with 'anything that compiles down to JS'? It's impossible for me to think of areas where iOS dev felt miles ahead, but I can imagine if I was writing JS I'd feel that way (I'm really into Flutter lately)
- wayneftw 6y ago> The Apple environment is absolutely _miles_ ahead of the web platform in several respects... Such as? In any case, I'd assume those miles are only gained on iOS where Apple has gimped the newer web APIs.
- deleted 6y ago[deleted]
- Razengan 6y ago> but you don't have many other desirable options. How did people make iOS/macOS apps before SwiftUI? i.e. before 2020?
- dimitrios1 6y agoApologies, the operative word was desirable. SwiftUI, at least in theory, has made the other options less desirable.
- kenver 6y agoAt this point I actually prefer the cocoa methods of creating UI. This kind of tech also affects the architecture of the app that is utilising it - SwiftUI and the like seem to be quite prescriptive in terms of application structure, whereas with cocoa I feel that I have a lot more possibilities.
- grishka 6y agoSo are you developing for the sake of the process or for the sake of the result? The result is always faster and lighter if you don't pile additional abstraction layers on top of whatever your platform offers (DOM for web and Cocoa/AppKit for macOS).
- hombre_fatal 6y agoBut you need uikit/appkit. And if you aren't satisfied with those, your options to bring or build your own abstractions are very limited.
- charliemil4 6y agoMaybe I’m weird, but I love UIKit/Autolayout and can’t stand web, with a slight distaste for SwiftUI. The idea of frame hierarchy is much more concrete in the autolayout world - which I guess helps the most.
- jmull 6y ago> But you need uikit/appkit. 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.
- oscargrouch 6y agoI think its cool if you have this high-level abstractions that help in productivity as long as you have a 'fallback mode' to a more powerful api. 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.
- contextfree 6y agoHow can this possibly be true? Web UI frameworks are built on top of the browser platform, and browsers are built on top of native desktop platforms, so aren't native desktop platforms inherently more flexible than web UI frameworks?
- redxdev 6y agoBrowsers largely aren't taking advantage of native UI frameworks (aside maybe from the window chrome and basic controls). Aside from the minimum required to get an OpenGL context (or whatever graphics tech) onto the screen they don't need to build on native UI. Sure, they're technically building on top of the native UI frameworks, but only by completely ignoring all of their functionality.
- fauigerzigerk 6y agoI am by no means an expert in graphics architectures so I'm sure someone will be able to explain this better and more correctly than I can. But as I understand it, "native" is itself a layered stack of APIs as you can see in this diagram: https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html 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.
- saagarjha 6y agoSaying that "both use Metal and have layers in between therefore they are largely at the same place" doesn't really work, because the abstraction layer that they expose is at a vastly different place and the internal pipeline for both is also very different.
- pjmlp 6y agoWhat freedom? 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.