Many many years ago IT experts like Gartner predicted that most of the future mobile applications will be written using cross-platform technologies(mainly web technology) and developers will write one code that works for all.
Today the reality is far different from that prediction, native technologies still dominating the mobile seen and most of people are using them to write their apps because simply cross-platform technologies failed to deliver an equivalent user experience to that delivered by native technologies and everybody knows how much user experience is crucial for application success .
But in 2015 Facebook team introduced a new hope for us the web believers called React native. React native is a framework based on reactjs written using web technologies that could deliver a user experience equivalent to the native user experience.
But why react native could succeed where many before failed? Well to answer this question let us start by analysing the failures.
What were the failure?
Two main reasons behind the failure of the previous technologies:
One code for all
The previous technologies insisted on the principle one code for all or what they call, write it once use it everywhere. So basically developers end up with the same application(same user experience) for both android and Ios devices.
While yes android and IOs are both mobile operation systems that deliver almost the same capabilities, the user experience in both os is different. No matter how fast or good your android application is, it will always look awkward, clumsy and strange within IOS applications. Android and IOS users are used to a certain user experience and both users are expecting to find that experience in each application they use, this is their comfort zone, this is what they like and love to use, proposing different user experience won’t really survive and the application will end up in the trash because it failed to deliver a familiar user experience.
Wrap it in the browser
No matter how much the devices and the browsers are enhanced, the above model results in performance problems especially when it comes to animations and long list views.
Adding to that the complexity and the headaches from managing cordova and all it’s workarounds to deliver the native capabilities to the web, a clear example of the problem is the child browser created to solve opening web page inside a web page used to perform tasks like connecting to third party apis using Oauth(facebook api,twitter api,google api…).
Wrapping an application in a web views looks like a very smart idea but unfortunately in the real world it failed to deliver a decent experience so developers always end up with a clumsy non-fluent application.
The new hope. React native comes with smarter ideas:
React native is smart framework that comes with a solution to the above problems:
One code for android and one code for IOS
Unlike to other web based technologies, React native enable developers to write one code for IOS (to follow IOS app design guidelines) and another code for android(to follow the android app design guidelines). So the application will fit right in both android os and ios os and the users won’t be able to feel an awkwardness and keep using the application like any other native application they have on the device.
The other good side of the story is with a smart architecture developers end up sharing a huge chunk of the code between the android and ios applications.
Also the same team can write both applications so managers don’t have to hire two teams to develop and maintain the application and we all know how expensive to hire two teams, managing them and keep them working for you.
So this model deliver two application that works fine within the targeted OS, using one team, shared code, faster execution, less expensive and simpler to manage.
No more wrapping, the virtual dom is the new deal
Instead of wrapping everything in a web view, facebook team come up with a smart solution called virtual dom.
Virtual dom is less complex virtual representation of the dom stored in memory, and because it’s virtual, it can be rendered to web dom or to native UI. Not only virtual dom deliver good performance enhancers and more UI control by only updating small UI states but also can be rendered to native components so the application, developers, wrote using web technologies ends up to be TRULY NATIVE and there is no need to use either a web browser or cordova.
No more weird UI behaviors, no more browsers performance problems and no more cordova workarounds, now it’s all web and it’s all native.
Final thought about react native
React native team proposed a framework that solved the two major problems of using web technologies to write mobile apps with a promise to be able to write good mobile applications with less effort, less management and less money.
The bonus is that react native is easy to learn and have facebook team and a good community behind it. So it’s well supported and trustworthy framework that can be the engine of your next application.
If you have further questions or additional issues please post your comment or get in touch with us.
Also published on Medium.