6 ms·
Good article. I definitely think that for a cross platform app, going all out with something like Cordova or React Native isn't particularly smart. Sooner or
by jmkni 9y ago
Good article.
I definitely think that for a cross platform app, going all out with something like Cordova or React Native isn't particularly smart.
Sooner or later, you are going to reach a point where you need to use a feature of the underlying OS which your abstraction layer doesn't support well (or at all) and will end up having to make a horrible compromise.
Also, apps build with these frameworks usually don't look or feel native, I can generally tell that I'm using something built with Javascript (not always, sometimes the developers nail it, but a lot of the time).
However I feel that developing completely separate native versions of the same app with zero overlap in code isn't smart either.
It's definitely good to find a middle ground.
I personally like Xamarin. Xamarin.Android and Xamarin.iOS get you as close to native as you can get, while still allowing you to share a fair amount of code between the platforms.
I'm using this approach on a project at the moment and it's working well.
I would love to try Basecamps approach here on a project, it seems very smart.
- htormey 9y ago“ definitely think that for a cross platform app, going all out with something like Cordova or React Native isn't particularly smart. Sooner or later, you are going to reach a point where you need to use a feature of the underlying OS which your abstraction layer doesn't support well (or at all) and will end up having to make a horrible compromise” I can’t really speak for Cordova but one of the strengths of React Native is that you can drop to native code relatively easily. I’ve done this in the past for projects and it’s not been a problem. Can you give a specific example of such a compromise? “I personally like Xamarin. Xamarin.Android and Xamarin.iOS get you as close to native as you can get, while still allowing you to share a fair amount of code between the platforms” I’d say the biggest problem with xamarin, aside from debugging, is that all your developers need to learn c# right? At least with the other approaches (article, Cordova, react native) mentioned they can use languages used by the target platforms (web, mobile).
- WA 9y agoCan you also share between iOS/Android and Web with Xamarin? Because that's what Basecamp's approach helps with.
- yAak 9y agoNot in terms of UI, no. If you write your non-UI code in shared libraries that are PCL or .NET Standard and have your web-server use them too, Xamarin enables that scenario, but doesn't really bring anything else to the table for a web app.
- jbverschoor 9y agoYou're comparing cordova with RN, and then you're saying xamarin is totaly different. It's not. RN are native components. In NativeScript it's the same + you get easy access to native apis
- rawrmaan 9y agoThe abstraction issue you're talking about doesn't exist. You can always drop down to custom native components for anything you need to do. That's one of the best parts. I spent 5 months rewriting my game Falcross from Obj-C to React Native, and it functions exactly the same (even better in some places because of RN's wonderful Animated API). Try the game and tell me if you "feel the JS": https://www.falcross.com/ https://www.falcross.com/ As a solo developer, RN allows me to share 95% of code between platforms and still customize that ever so important 5% with native modules. And I'm iterating 2-3x faster than I was with Obj-C.
- jmkni 9y agoThat's awesome, I'm a solo dev too and I didn't know that about react native. Definitely want to try it on a project at some point.
- s73ver_ 9y ago"However I feel that developing completely separate native versions of the same app with zero overlap in code isn't smart either." I don't see why. They're different platforms; you're going to want people who are experts on the platform working on it, not someone who is only doing the other platform because the boss said they need it. I would take native teams for both platforms over one team doing a hybrid thing any day.
- weaksauce 9y agoWhile a fully native solution from two teams would probably be better comparatively, it's also the most expensive. If you have something like react where you can share the common business logic and then drop down into native components when required to use features that haven't been exposed to react it's probably a net win. I haven't done much react native coding but it's certainly an interesting value proposition for smaller shops that can't afford to have two completely separate app development teams.
- yAak 9y agoWell, sharing business logic can reduce # of bugs and keep behavior consistent between platforms. That being said, actually shipping the same code on both platforms has its own costs and considerations.
- s73ver_ 9y agoMost of that logic is usually on a web server somewhere, so it's already being shared.