Cross-platform app development frameworks

As far as I know, developers enjoy working with React Native and strongly believe in the potential of Flutter, a young but a very promising tool. What do you think about them? Are they better than, for example, Xamarin and PhoneGap? What do you like more - React Native or Flutter? Why?

1 Like

Hi,

I would opt for Flutter over React Native, but thatā€™s only because Iā€™ve tried to build a prototype in the latter. The result? Well, you really end up with 3 codebases when you use React Native (especially if you have a complicated application). One code base is JavaScript for the React Native code. Another is for native iOS plugins to handle what couldnā€™t be done in RN. Then thereā€™s the codebase for native Android plugins that couldnā€™t be done in RN. You also have lots of ā€œIf current OS is iOS, then do this. Otherwise, do thatā€ code. Yes, youā€™ll have a panoply of if/else structures just because one platform has a particular control or way of doing things that doesnā€™t exist on the other.

Want to save your sanity? Write native apps. (Or perhaps try Flutterā€¦might be good after all. Havenā€™t tried that one yet.)

Best of luck,
Richard

4 Likes

Last I came across a blog post on ā€œMulti-OS Engineā€ (https://multi-os-engine.org) ā€¦ Maybe give that a try?

1 Like

Thank you for sharing your experience!

I asked on Twitter what people thought, and I wanted to share a few responses here for posterity:

https://twitter.com/rrubin/status/1050363052686757888

https://twitter.com/krzyzanowskim/status/1050363501288534017

https://twitter.com/botros__fadi/status/1050370223021481984

https://twitter.com/botros__fadi/status/1050370504064946176

https://twitter.com/Wassmerica/status/1050384425295458305

https://twitter.com/LinguaBrowse/status/1050727822703173633

I hope that helps - and thanks to everyone who contributed their advice!

2 Likes

Thank you very much, itā€™s great to have a lot of opinions from developers!

Maybe this may interest you:
airbnb dropped react native

and some intelligent thoughts about native vs react:

1 Like

This question is the most valuable question for software development at the moment. All the languages are rapidly changing to fullfill this question from the industry: please let us write one codebaseā€¦
At my work we work with native code bases for android(java), iOS(objC&Swift) and some windows apps in C#. And we have javascript solutions like canvas, and react native with svgs and animations.
Both is possible. I prefer native code bases myself but sometimes it saves looots of time to develop something in a javascript solution like react en flux.
I saw some writings on the RWsite about writing in Kotlin and Swift. Thats something I want to dive into. Then you have native apps with similar code base structures and phrasing. Plus the optimal performance of the devices.

1 Like

Iā€™ve been writing software a long time ('83). Been doing Apple since '86.

In that time, Iā€™ve seen one hell of a lot of cross-platform frameworks come and go.

These days, I choose to write Native iOS. in Swift. Using Appleā€™s built-in frameworks.

React Native is a free lunch. Businessmen like it, because they believe they can hire cheap, shoddy JavaScript programmers, and come out with results ā€œjust as goodā€ as iOS Swift Native, or Android Java Native.

Did you ever run into old-time Linux CLI jockeys that swore that X11 was going to ā€œrevolutionize Linux as a desktop operating system,ā€ because it was ā€œjust as goodā€ as native Apple Mac OS or Windows?

Soā€¦howā€™s that working out?

Sadly, T.A.N.S.T.A.A.F.L. I am forced to roll up my sleeves and ā€œGo Native,ā€ so to speak. I have become VERY disappointed in a lot of todayā€™s ā€œfree lunches.ā€ Iā€™ve always been very ā€œclose to the hardwareā€ (came from Assembly and driver stuff), so I just plain old like it.

With one exception: I have seen some pretty good stuff done with Ionic (JavaScript). Iā€™ve also seen some real dross done in it. It has a particular workflow and architecture that it addresses.

2 Likes

Theres a lot of negativity on this board towards React-native which is frankly not totally warranted.

There are a number of super successful and complex applications on the app store that are in fact written in react-native ( Uber eats, wix, Smarkets, taskrabbit ).

Some notes based on my own personal experience writing software with the framework, 6 years native iOS and 1.5 years on react-native.

The good.

  • Donā€™t just code in vanilla JS, use a type system either flow (good) or typescript (better).
  • The state management and diffā€™ing mechanics of react lead to functional coding practices which creates highly deterministic code, I have grown to really enjoy redux and its something that would be quite difficult to reproduce in native code at least entirely.
  • The react layout system is pretty great, super easy to use and read.
  • Performance is good enough.
  • You really donā€™t have to go near the native codebases, though its really useful if you know both platforms.

The bad

  • Navigation is a mess, there are a couple of decent approaches ( react-navigation, react-native-navigation ) but no real consensus.
  • Performance is awful if you are doing something complex or something gesture driven, you can get close to native otherwise.
  • Doesnā€™t give the same compile time certainty as swift or kotlin, unless you are super strict with your opt-in typing system.

Its still miles better than phonegap and you donā€™t have the same platform edge cases to handle like xamarin. Its also proven in the wild and many companies happily ship with it everyday.

Flutter solves some of the performance hurdles of react-native ( no bridge ) so complex animations are a lot more fluid and you can do threaded actions through isolates, dart is also typed. However its largely unproven in the wild and doesnā€™t have the same developer support behind it.

3 Likes

I have successfully used Xamarin Forms on four different commercial apps and the capabilities required of each subsequent app are higher than the previous.

Iā€™ve achieved multi platform with almost one code base (up to 95% re-use), things like push notifications need platform specific answers.

Having said that, the launch time feels longer than what I would like, so Iā€™ve been tempted recently to look at other options.

React Native looked exciting, but I just jolt back from any technology that says you canā€™t just modify an entry in a list and for it to redraw (binding) instead you have to embrace reactive and mutate the list etcā€¦ no thanks, this should be easy.

Flutter, this excited me, but I canā€™t embrace a technology that isnā€™t multi threaded, Plus I wasnā€™t clear whether Dart was transpired or not, but with such a small footprint it would achieve my quick load times.

I simply donā€™t have time to learn native fully on IOS and Android.

Iā€™m stuck eith Xanarin for the foreseeable, but you know what, thatā€™s not a bad place to beā€¦ Microsoft are heavily supporting the technology so itā€™s only going to get better (until the drop it :yum:)

The other angle to consider, customers donā€™t give a crap. Ultimately make a fantastic app and people will embrace the app regardless of what itā€™s written in. Xamarin really is very productive and capable.

For an example of the most recent Xamarin app Iā€™ve worked on is [Https://www.getvehiclesmart.com](http://Vehicle Smart)

The apps Iā€™ve worked on include storage (SQLite, preferences), gps, push notifications, background service, custom renderers, dependency injection, lambda functions, threadingā€¦ the list really does go on.

The more I think about it, the more I realise Iā€™m using the right technology stack.

Thereā€™s also the option of writing a Mac and Windows UWP app with it :nerd_face:

3 Likes

Thank you for these articles!

Yeahā€¦ Iā€™m not really being fair, here.

I always get cranky when people get hung up on tools as being ā€œmagic bullets.ā€

The simple fact of the matter is, is that if you want to get good results, you hire good people.

Good people can be a really good native programmer, expert on the UIKit, or they could be a really good JavaScript programmer, expert with React Native. Each will give you an excellent result, given a problem domain to which the given skillset is best-suited.

And good programmers; regardless of their specialty, seldom come cheap.

It does get a little bothersome when you get ā€œmy only tool is a hammer, so all problems are nailsā€ approaches.

Most hybrid systems will give very satisfactory results, when paired with a client-server system. The apps can be big, and you canā€™t get too fancy with UX, but, given good design and a good UX designer (pretty important -sometimes the engineer is good at it, but more often, youā€™ll need to hire someone else), you can get very good results.

In these cases, you can get a lot of bang for your buck, as you can often get multiple-platform deployments for one (mostly) codebase. Donā€™t skimp on the programmer, but youā€™ll get a decent Android app and a decent iOS app, suitable for simultaneous release.

They are maybe not so good for things like games, applications with intense UX, or intense communications requirements (like fancy WiFi/Bluetooth stuff). I just spent a couple weeks writing up a really nice spinner button, and thereā€™s no way that could have been written in anything but native, or in a game engine (which would have been overkill, as these are going to be map markers). Iā€™ve also written WiFi device control frameworks, and that needed not just native, but Objective-C native (for a static fat framework).

You get what you pay for. There just ainā€™t no such thing as a free lunch.

Be careful listening to hype. Google ā€œthe Dunning-Kruger Effectā€ to find out why a person can honestly believe themselves to be far more apt than they really are.

3 Likes

Thanks for the comment!

Iā€™m new to software development, < 1 year. But from everything Iā€™ve seen, the closest thing youā€™ll get to cross platform is to learn C++.
I know that doesnā€™t address the OPā€™s question about a framework that does all the magic for you, where it basically works like one massive adapter pattern providing one API in the place of the different APIs of all the platforms you wish to deploy to.

Even learning a low level language doesnā€™t solve the problems folks have addressed in this thread. Each platform has idiosyncrasies that call for different code. There will be different ways of handling user input and display. With C++ you still need to know how to use the various persistence technologies which are unique on each platform. Etcā€¦

I think that the dream for a cross platform magic bullet will always be a matter of degrees and compromises. Exactly HOW cross platform do you want it to be? What I mean is, when you push for cross platform, do you want one code base that will run on EVERY platform? Android, iOS, web, macOS, Windows etcā€¦ Or do you just want to cross two platforms? Just the mobile platforms?

If you narrow the degree of what you call cross platform to just the Apple ecosystem, you still see technologies that are imperfect compromises. I would argue that Auto Layout is a kind of cross platform technology. It allows you to build one app that runs and displays data on a wide variety of devices. And even that isnā€™t a magic bullet, and it was built by Apple itself to solve a narrow set of problems.
So, if the company that owns a given platform canā€™t perfect a ā€œwrite once, deploy everywhereā€ technology for something simple like front end UI stuff, how am I to believe thereā€™s a framework out there that will let me compile full apps for very different hardware? Oh, and the framework is free and open source-ish, you say?

2 Likes

There is also Haxe.
The Cross-platform Toolkit
Haxe is an open source toolkit based on a modern, high level, strictly typed programming language, a cross-compiler, a complete cross-platform standard library and ways to access each platformā€™s native capabilities.

If we talk about the performance basis then definitely my answer would be flutter also in terms of compatibility app features, and engineering cost. However, React Native is good when it comes to finding software developers, cheap cost shortcode, and also having a small size of project.