ohanhi / elm-native-ui

[CLOSED] Experiment: mobile apps in Elm using React Native.
BSD 3-Clause "New" or "Revised" License
1.54k stars 75 forks source link

FAQ for the choice of react-native? #40

Closed ffigiel closed 7 years ago

ffigiel commented 7 years ago

When I stumbled upon this project, I was confused - why does elm need react-native to work on mobile? So I asked on #general:

megapctr [10:21 AM] any thoughts on why elm-native-ui uses react-native rather than cordova or phoneGap? https://github.com/elm-native-ui/elm-native-ui

labbekak [10:30 AM] React Native has actual native UI

[10:30] And it's more performant

[10:31] I think using Elm with cordova is pretty trivial, isn't it?

Are you planning on adding a FAQ section? If so, I'd like to suggest explaining the advantage of react-native there.

doodledood commented 7 years ago

It's true that elm can be run using Cordova but it still isn't the same as a fully native app. Using fully native views instead of web views is much more performant and most importantly feels like a part of the mobile ecosystem. React native has the idea that each mobile platform is different and therefore should be built differently, with different design and sometimes functionality to fit into the platform. (for example an android app might have a hamburger button that opens a side menu while an iOS app might have tabs on the bottom and not menu at all). Cordova is all about building an app once and running it everywhere pretty much. It's a different philosophy. Both have their own use cases but since react native is geared towards performance and a better user experience I think it is necessary here. On Tue, 11 Oct 2016 at 11:47 Filip notifications@github.com wrote:

When I stumbled upon this project, I was confused - why does elm need react-native to work on mobile? So I asked on #general:

megapctr [10:21 AM] any thoughts on why elm-native-ui uses react-native rather than cordova or phoneGap? https://github.com/elm-native-ui/elm-native-ui

labbekak [10:30 AM] React Native has actual native UI

[10:30] And it's more performant

[10:31] I think using Elm with cordova is pretty trivial, isn't it?

Are you planning on adding a FAQ section? If so, I'd like to suggest explaining the advantage of react-native there.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/elm-native-ui/elm-native-ui/issues/40, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2PjZ8CrogKEFZ-r_oLbQ13yloA_DSTks5qy00HgaJpZM4KTY4S .

afidegnum commented 7 years ago

Frankly, i will strongly suggest to make elm hook into mobiles SDK or API, i.e NDK or android, and IOS xcode, with this, you are in total control. otherwise, your fate rely on react native application stability and you could be affected if there are unforeseen bugs. I will be glad if we start from that direction, I believe other developers would volunteer to assist as well

ohanhi commented 7 years ago

@megapctr Right, this is something I have overlooked -- I have worked with Cordova before and sort of assumed everybody knows of its inherent weakness. Essentially, it's just an outdated mobile browser that can call on certain platform features. It is no replacement for native applications.

@afidegnum Yes, Evan also found it questionable to use even React Native in between the Elm output and the native bridge. Presumably, we could take a look at how RN utilizes JS at the platform level and re-implement a similar thing for Elm Native UI. Obviously, this is way too much to take on by myself, but it's starting to seem like the time is ripe for collaboration on this front.

ffigiel commented 7 years ago

@afidegnum @ohanhi I totally dig the idea. I'd like to help, but I probably won't be useful since I don't have any knowledge about android/iOS development or elm's Http library internals :disappointed: