Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New episode: SwiftUI first impressions #67

Open
JohnSundell opened this issue Jul 1, 2019 · 10 comments

Comments

Projects
None yet
7 participants
@JohnSundell
Copy link
Contributor

commented Jul 1, 2019

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.

@MaxDesiatov

This comment has been minimized.

Copy link

commented Jul 1, 2019

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.

@lattner

This comment has been minimized.

Copy link
Contributor

commented Jul 1, 2019

👍 I'm very excited for this episode!

@JohnSundell

This comment has been minimized.

Copy link
Contributor Author

commented Jul 1, 2019

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 🙂

@MaxDesiatov

This comment has been minimized.

Copy link

commented Jul 1, 2019

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.

@manojkarki

This comment has been minimized.

Copy link

commented Jul 1, 2019

  • Not being available for iOS 12, will make the adoption delayed by at least a year, especially for big Apps/companies.
  • Declarative syntax finally made building UI on iOS a charm. All examples so far demonstrates small UIs, so I am curious to learn/see best practices around using SwiftUI for big projects.
  • I still struggle to achieve many things with SwiftUI (or struggled earlier), which were very straight doing in UIKit. I guess part of it is paradigm shift but partly lack of documentation.
    e.g.
    Paging in ScrollView
    Animations
    Simple things like making a View fill the entire superview
@LouisCAD

This comment has been minimized.

Copy link

commented Jul 7, 2019

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.

@LouisCAD

This comment has been minimized.

Copy link

commented Jul 7, 2019

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!

@BasThomas

This comment has been minimized.

Copy link
Contributor

commented Jul 7, 2019

Looking forward to this one 👀

@BasThomas

This comment has been minimized.

Copy link
Contributor

commented Jul 7, 2019

This episode has been recorded by the way :)

@MuthurajMuthulingam

This comment has been minimized.

Copy link

commented Jul 11, 2019

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.