
Alibaba Puts SDK Flutter to the Test - hliyan
https://hackernoon.com/competing-frameworks-alibaba-puts-sdk-flutter-to-the-test-88eb8cf1f35a
======
hliyan
Found this while evaluating options for moving away from React Native (which
is not really working well for us). As much as I love Flutter/Dart, the big
problem: most of our users are on iOS, and Flutter being a Google project,
seems to prioritize Android over iOS (RE: UI polish and runtime performance).
Looks like we'll be sticking to native dev for a while...

~~~
kitsunesoba
IMO, every attempt thus far has approached cross platform entirely the wrong
way. They’re all way too focused on providing deeply custom UI. I believe that
it may better to instead abstract app navigation as its own separate thing,
making it a setting in a config file (e.g. tabbed, hamburger, split-pane
tabbed, etc) and restricting UI coding to individual screens, which would have
style hinting abilities and could be built via any number of platform agnostic
(and perhaps language agnostic) ways. All this would then compile down to
native UIKit, Android SDK, UWP, AppKit, etc.

So the idea would be you program your app’s individual screens, throw in some
styling, select platform appropriate nav schemes (hamburger for android and
tabbed for iOS for example) and hit compile to generate native per-platform
project files+code.

This sort of solution wouldn’t cover more complicated navigation schemes or
use cases that actually require highly custom UI, but if you’re doing either
of those you’ve probably outgrown any kind of cross platform solution anyhow.
Realistically I believe this would work well for probably 80-90% of non-game
apps and wouldn’t suffer many of the drawbacks that usually come with “silver
bullet” style cross-platform setups.

~~~
aaronbrethorst
Or you could abstract out the model, networking, persistence, and other
services logic from your app into a reusable library,—and then consume _that_
from a native, unshared frontend.

I'm hoping that Swift becomes sufficiently viable on Android that I can reuse
library code across iOS and Android sometime in the next few years.

~~~
fstephany
Looks like Kotlin gets the lead in this area with Kotlin Native.

Jetbrains moves pretty fast and the integration works surprisingly well for
something this young.

~~~
kitsunesoba
As great as jetbrains is, I think Swift has much better long term potential in
terms of FOSS tools. The Swift language server Apple is currently working
should bring an open tooling avalanche.

In fact I think the high quality of jetbrains IDEs might actually impede
Kotlin tooling development… why bother when first party tools are so good?

~~~
oblio
The thing is, developers outside of Apple platforms don't really adopt Apple
techs. Objective C never took off and the same seems to be happening to Swift.
I don't know anyone using it on Linux.

~~~
kitsunesoba
Objective-C’s cross platform use was crippled due to half of its essentials
being tied up in Cocoa. Objective-C by itself doesn’t even have memory
management.

Swift doesn’t suffer this issue — it’s been built for multiplatform use from
day 1. There are still some discrepancies, but today Swift on Linux is about
as usable as Swift on Apple platforms. There’s even several (4+ last I
checked) modern web frameworks for Swift and even GTK+ bindings.

On top of this, its Windows port recently reached a useable state and there’s
work being done on a Win32 bindings. Once that’s done, it will be possible to
write an app with a common core and 3 different UI layers all in Swift which
connects to a web API written in Swift. That’s already leagues beyond what was
ever achieved with Obj-C and momentum is continuing to build.

~~~
oblio
Ok. But the questions now is: why would you adopt it?

You could use Java/OpenJDK or even Kotlin/OpenJDK.

You could use dotnet core.

You could use Node.js with Typescript.

Or Python/Ruby/PHP/...

All those are mature and support all major operating systems way better than
Swift does.

I'm not sure what Swift's Unique Selling Proposition is. From where I'm
looking it seems to be: "it's backed by Apple".

------
gardaani
Here's another performance comparison (2018). It compares Flutter to native
iOS app. Flutter consumes 2x more CPU and memory for an app with 60fps
rendering.

[https://medium.freecodecamp.org/how-fast-is-flutter-i-
built-...](https://medium.freecodecamp.org/how-fast-is-flutter-i-built-a-
stopwatch-app-to-find-out-9956fa0e40bd)

~~~
amarokaz
Flutter has had a lot of performance improvements since that date. It'd be
great to see that updated compared to current version

------
benjalimm
Correct me if I'm wrong. But it's possible to mix native with some Flutter +
RN for laying out views right? I'm pretty sure that's what Instagram does
(mainly in Obj-C but some views are in RN) and Snapchat (Flutter). Doing this
would make sense when running apps on both platforms yea?

------
heroic
How does this compare with the new RN architecture coming in? Does anyone know
what kind of gains we can expect?

------
tinus_hn
It is quite unfortunate no one cares about the Android on iOS monstrosities
this framework creates.

------
atalla
what about nativescript?

~~~
kwindla
I was just looking at NativeScript and would love to hear about experiences
developing production apps with it.

We have a pretty large javascript web app code base and have built both native
and React Native ports. Both of which have had more cons than pros for us. So
we ship on mobile as a web app.

The holy grail for us would be to use our javascript library code underneath
native UIs (that we write ourselves) for both iOS and Android.

~~~
jbverschoor
Just try it.. it's great

