Closed JohnSundell closed 5 years ago
Great to see this getting a dedicated episode, thank you all for preparing this!
Having worked with React for web and React Native for a couple of years already and even prototyping a UI framework in this style for iOS in Swift, I'm very excited that Apple has responded to the demand for declarative UI. I've shared some of my thoughts on this on Swift Forums previously.
To elaborate, the React ecosystem feels very fragmented when comparing it to SwiftUI/Combine, but this is applicable to the JavaScript ecosystem in general. Overall, I find it reassuring that we'll have 1st-party solutions for common problems like cancellable animations, asynchronous dataflow etc, while with React it's for a developer to make a decision on the supporting stack they use to solve these problems. React is only a small piece in the overall architecture, it provides only a fraction of what we get now with SwiftUI/Combine.
On the other hand, this still won't be enough for me as a consultant to easily transition clients who use React Native towards SwiftUI. Being able to share code between iOS, Android and Web is almost always a top requirement for people who're in the React Native ecosystem already. So overall, it's hard for me to say that SwiftUI will take the mobile development and even a significant part of the UI development on all platforms by storm, due to it being closed-source and confined only to Apple's platforms.
I really appreciate the hard work Apple engineers have put into SwiftUI and Combine during all these years it was in development, but in 2019 I don't think this is enough for a developer ecosystem to thrive. All main competing UI frameworks are open-source and it will be very hard for SwiftUI to make a dent in those if it also doesn't become more open. Otherwise, it's limited by the market share of Apple's hardware, which admittedly hard to imagine will grow again in the foreseeable future, especially with Apple focusing on services and more expensive devices. This feels not quite in line with the original "world domination" goal declared for Swift.
👍 I'm very excited for this episode!
Thanks for your thoughts @MaxDesiatov, and for describing them so thoroughly. Do you mind adding a less verbose version (like 2-3 sentences) that could potentially be read out on the show? It won't be possible to read a 4 paragraph piece I'm afraid 🙂
Thank you @JohnSundell! In no way I expected this to be read out, this was more of a suggestion for anyone interested in this as a discussion point. But if this is considered by any chance, I'd paraphrase it this way:
SwiftUI is a great shift in the way we build apps as Swift developers, and it's surely well-architected and it took years of engineering effort for it become what it is now, despite it being unveiled only so recently. But I hope it also becomes modern and open in the way it's designed and the community around it is engaged by Apple. All major competing UI frameworks are open-source, and I can't imagine how SwiftUI can achieve at least a significant fraction of the mindshare those frameworks have without becoming open-source.
When I saw SwiftUI in WWDC livestream, I immediately though about Kotlin-based Jetpack Compose which is very similar, except it uses functions only, being structs-free and classes-free. At Google I/O (2019) an ongoing effort to make UI development easier has been unveiled, taking advantage of the Kotlin programming language. Their priority is to make a new UI toolkit for Android, but the way they are building it is very platform agnostic, and already relies on a multiplatform language that compiles and runs well on macOS and iOS, despite that part being only in beta. Once Jetpack Compose is stable enough in terms of API, I think it'll be only a matter of time before it competes with SwiftUI and cross-platform UI frameworks like React or Flutter. It's important to note that Swift and Kotlin have a very similar syntax.
For developers that need or want to support iOS 12 and earlier (and all the devices that will never be updated, in an Android-like fashion), maybe Jetpack Compose will be a great alternative to SwiftUI in the not too distant future.
Another thought:
When I saw SwiftUI + Xcode preview, I was amazed at it. The ability to code the preview with not much code at all, and compare designs in a very straightforward way is really nice!
Looking forward to this one 👀
This episode has been recorded by the way :)
An approach of declarative UI does make difference in Apple eco system. It became familiar to developers who are worked in following order, Reactive Pattern (Web/Mobile(ReactJS/Redux)) -> Cross Platform (React Native/Flutter) -> Native Apple eco system (SwiftUI/Combine(state management))
Thanks a lot for all of your input. Although we didn't end up quoting anyone on the episode (sorry about that, we didn't end up having any spare time on the episode), I really appreciate all of your thoughts that you put in here.
The episode is now out: https://www.swiftcommunitypodcast.org/episodes/6.
Thanks again everyone, and hope you enjoy the episode! 😀
Amazing episode!!! Congratulations 🎉
Hi everyone,
We're looking to record a new episode of the show this week, which will be about sharing first impressions of SwiftUI. The episode will feature myself, @twostraws, @erica and Kateryna Gridina. I'm really excited about it!
For this episode I thought we could try something fun. If anyone wants to share their first impressions of SwiftUI, then feel free to reply to this thread - and we'll read out some of the responses on the show.
So let us know, what do you think of SwiftUI now that we are a few weeks past the initial announcements? Have you had time to start playing around with it, and what are some of your initial reactions to the way it works?
If you have any other feedback or suggestions for the episode, those are of course super welcome too.