6 ms·
Why learn SwiftUI? If you want a declarative UI framework wouldn’t you be better served for your time to learn something like React Native or Flutter? I’m not
by rubicon33 6y ago
Why learn SwiftUI? If you want a declarative UI framework wouldn’t you be better served for your time to learn something like React Native or Flutter? I’m not trying to knock SwiftUI, I am genuinely curious what the value proposition is for anyone considering it...
- amw-zero 6y agoBecause it’s native to the platform. Seriously, that’s huge. The React Native toolchain is cumbersome to say the least. There’s something to say about a first-class library, meaning one that is being used exactly as designed. I mean, why do people use Javascript? Because it’s the native language of the browser.
- rubicon33 6y agoYea I don’t disagree, but what development team has the luxury of choosing SwiftUI? Most places hiring are looking for cross platform “2 developers for the price of one” ... and the burden of dealing with cumbersome react native falls on the developer.
- PandawanFr 6y agoI'm guessing companies that have the resources to go with two separate development teams for each platform will tend to go for that route since it leads to better performing applications. e.g. FB Messenger's blog post about going back to native after using React Native.
- bartvk 6y agoI make my money by doing internal projects for companies. These organizations run their own app store, or just force-download their apps onto all of their iOS devices. It's lovely to focus on one platform.
- Aaargh20318 6y agoIn my experience, cross platform development only works for simple apps. If all you’re doing is fill in some forms and update a database, sure, go with a cross-platform toolkit. If you’re doing anything more complicated than that, the productivity gains diminish quickly to the point where it’s easier and faster to just build to native applications.
- user-the-name 6y agoAnyone serious about doing high quality apps will do native development on each platform.
- Razengan 6y agoBut I’m too lazy and want to target the most users with minimal effort and without learning anything new, their experience and performance be damned.
- rubicon33 6y agoOr from the perspective of the employer: I'm too cheap, and rather than bite the bullet and spend money on a good mobile team, I'd rather have one guy do it all in React Native! His quality of life be damned!
- firecall 6y agoBecause it's an Apple sanctioned technology within XCode?
- Austin_Conlon 6y agoApple probably depends on SwiftUI more than Google does on Flutter, so they'll almost certainly keep it around for the long term. It's used for widgets, the SwiftUI preview feature in Xcode, and for various watchOS app rewrites to name a few examples, whereas with a Google project there's always the question of whether it's just a short-term hobby.
- Razengan 6y agoAfter you’ve used SwiftUI you wouldn’t want to work with any other framework. Even with all the rough edges currently SwiftUI+Combine is how I want all my programming to be done from the day they were announced.
- pjmlp 6y agoYou should try to have a go at Smalltalk and commercial Common Lisp environments.
- user-the-name 6y agoI highly doubt it is even possible in any og those to produce something that would actually be releasable as a high-quality iOS app, rather than an embarrassing, ugly mess.
- jamil7 6y agoThere are a lot of reasons and they can be discussed ad-nauseum. When you boil your question down to it's essence: "Why use a first-party framework and language" it's much easier to answer. The simplest and most pragmatic answer is "because this is what Apple tells us to use". It's a business decision more than anything else, if your business somehow depends heavily on mobile then you want to build native apps.
- yoz-y 6y agoIf you only target iOS for example it's a no brainer. There are use cases where you absolutely have to use it, those are currently Home Screen widgets and WatchOS Apps + complications. I would not be surprised if more SwiftUI-only use cases were progressively added. SwiftUI is also cross-platform, in Apple ecosystem. That is, you can develop all of your components and have them work on iOS and macOS. Then glue them together with platform specific main view. SwiftUI will also always have all of the native features whereas cross-platform tools always lag behind. This is important for smaller developers as releasing before others can be what makes or breaks your app's success.
- bsaul 6y ago"cross-platform, in Apple ecosystem". Please, let's not gobble that crappy apple PR spin on what that term means. Cross-platform never meant "just an iphone and a mac os with the correct version". SwiftUI looks like a very cool tech, but it isn't "cross-platform", period.
- jamil7 6y ago> Cross-platform never meant "just an iphone and a mac os with the correct version". SwiftUI looks like a very cool tech, but it isn't "cross-platform", period. It might be crappy marketing spin but it's hard to call anything other than the web cross-platform by that definition. It's not just iPhone and a Mac either, it's every Apple platform that has a screen. I don't think Flutter or React Native can claim that despite being called cross-platform.
- deleted 6y ago[deleted]
- yoz-y 6y agoI’m all for using a different term, what would you suggest as a shorthand for “same code runs on a phone, a computer, a tablet and a watch”? Cross-Apple?
- Razengan 6y agoIn addition to the other answers: Because Apple could and I bet they sure will add hardware optimizations in future Mn chips for apps made entirely in Swift+SwiftUI+Combine etc. Also I don’t think Flutter comes close to how SwiftUI spits native paradigms for each device like Mac, iPhone, iPad, Watch and TV from mostly the same UI code.