John O’Connor is an Entrepreneur, Engineer, Educator, Serial CTO, Startup Junkie, and Tech Nerd with social polish. He currently serves as CTO at CardBlanc. In this issue of Tech Splash he shares his insight into the new REACT-native framework and why you should never build native:
Building your application for a platform purely in its native language and API has always been a risky endeavor.
It's not hard to imagine the horrors of having the core of your entire business run on software that would only work in Windows 95 because it relied on some long-scrapped Windows API (I use this example because I've actually seen that happen - and they're still running it 20 years later).
At it's core, it is a form of vendor lock-in - one that many platform providers are all-to-happy to encourage. In the desktop world we've already made the move; from .NET's Common Language Runtime (CLR) to Java's JVM, savvy programmers understand that portability is important when it comes to ensuring a software product's survivability.
Except, it seems, when it comes to mobile app development.
I've worked with countless CTO's and VP's that would argue, to the death, that building native for mobile is better than using a CLR or web-based technology. It seems the lessons of the past two decades have not been learned. Or perhaps they're aiming for a job-security angle. Either way, it's silly to think that the same trend of 'agnosticising' won't eventually make it's move into mobile. The question is, how and when?
I've been a fan of using web technologies for building native apps for a long time. Web technologies were already designed to solve the problem of cross-platform compatibility, and as WebComponents come ever-closer to reality, the abstraction that we need to build component-based native apps is fast becoming a standard for the web. I thought WebOS was a brilliant turn and Palm (and later HP) missed the boat by scrapping this obviously useful paradigm.
Last week, building native mobile apps got a lot more interesting.
Now before you grab your pitchforks and chant "AppCelerator - Xamarin - PhoneGap", there's a major difference that makes React-native "not-just-another-web-app-wrapper". REACT-native is already being used - on probably the most widely-proliferated app in existence: Facebook's Mobile App . Gone are the days where Facebook eschews HTML5 and regrets even using it .
And REACT itself is not just a web-based technology. It's a component-building system that works with ANY imperative view technology (for example, UIKit or Android's View SDK). Using a "Virtual DOM" and over-loadable side-effect-free rendering functions means that react is not ON the web, but merely OF the web. Writing components in an abstract way and allowing the underlying rendering technology to change is how we've built portability every time (from C++ compilers to Virtual Machines) and it seems like React has finally brought some semblance of this to the mobile world in a way that has already been proven on a large-scale.