Facebook’s React Native could succeed where other cross-platform frameworks have failed

Familiar JavaScript, 85 percent code reuse and an interface that users will accept make React Native a strong cross-platform alternative.

Facebook’s React Native could succeed where other cross-platform frameworks have failed
Credit: REUTERS/Dado Ruvic

At the F8 developer conference earlier this week, Facebook reported an unprecedented 85 percent reuse of code attributable to React Native on its internally developed Android and iOS Ads Manager app.

On top of that, the company announced that Microsoft will port React Native to run on Windows 10, Windows phones and Xbox One. And Samsung announced it would port React Native to its Tizen OS that runs on many devices, including wearables and smart TVs.

That is significant considering cross-platform frameworks have such a bad reputation that developers often joke that Mark Twain once said, “There are lies, damn lies and then there is cross-platform.”

Despite such cynicism, new cross-platform development frameworks that promise to let developers reuse software built for one platform on another draw an audience because of the hope for increased developer productivity. In fact, Facebook’s open-source cross-platform framework React Native has captured a lot of attention among developers and boasts over 600 contributors on Github.

The reason Microsoft and Samsung embraced React Native may be because Facebook has the best chance to create a multi-platform app design language that produces an equally satisfying user experiences on different platforms. The Achilles’ heel of cross-platform frameworks is the way the user interface (UI) is implemented because users resist unfamiliar UIs and design languages. User resistance to Facebook’s UI elements and design language has been mitigated by the familiarity users have with these apps. The Facebook and Facebook Messenger app rank number 1 and 3, according to Comscore, and usage of the Facebook app in minutes per day is ranked above all other apps.

There are two reasons why organizations try cross-platform frameworks. Cross-platform accelerates the adoption of new platforms by siphoning apps from one platform’s ecosystem to run on another without having to rewrite them. And using a cross-platform framework relieves the doubling of development expenses attributable to duplicate staffing of designers and developers for each native platform.

User Experience Key to Successful Cross-Platform Frameworks

The many attempts to build cross-platform frameworks have fallen short of native apps in the quality of user experience. These tools haven’t incorporated the very different styles of Android, iOS and soon Windows UIs. Implementing cross-platform development frameworks has been a trade-off between building a single app with the framework that runs on both platforms but compromises the UI and user experience and building two versions of the app with separate native UIs, offering a much better user experience that incorporates only 40 percent to 50 percent code reuse built with the framework.

Developers of mobile cross-platform frameworks are unable to automatically generate iOS and Android native UIs from a single code base. The differences in the Android’s Material Design, iOS’s Flat Design and Windows Metro UIs create too much complexity to be captured in one cross-platform programming tool that generates a native user interface for each platform. To alleviate this complexity, the cross-platform frameworks create yet another framework-specific UI—at the cost of compromising the strengths of the native UIs in favor of one that runs on all of the platforms.

Popular cross-platform frameworks such as Xamarin, which uses Xamarin Forms, and Apache Cordova, which uses webviews to create a single app that runs across platforms, have a noticeably non-native UI. Users often resist these shared UIs because they look and act differently than the native apps on their smartphones. This type of app tends to fill a narrow niche of apps used by small audiences. If the developers intend to draw a large audience, a native UI will have to be built on top of a shared cross-platform code base for each platform targeted. Doing that, however, marginalizes the cost savings of reuse and complicates ongoing development and maintenance.

React Native isn’t that different than Apache Corova. Both types of apps are built with JavaScript, HTML and CSS that executes on an interpretive SDK installed on Android and iOS. What is different is it has Facebook’s UI and design elements, which users are comfortable with. 

Facebook Ads Manager has proven that, at least for some types of development, generalist JavaScript developers can build cross-platform apps. JavaScript, which is responsive, interpretive and easy to debug, brings the largest community of developers to bear on the limited supply and expense of Android and iOS platform developers. User familiarity with the Facebook UI makes it an acceptable cross-platform UI that reduces complexity and the need for native UI code.

Whether React Native can reach 100 percent reuse is unknown, but 85 percent reuse is very high—high enough for almost every developer that needs an iOS and Android app to evaluate.

To comment on this article and other Network World content, visit our Facebook page or our Twitter stream.
Must read: Hidden Cause of Slow Internet and how to fix it
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.