ArticleCordova, React-Native, Swift: What is really next?
I'm quite excited about writing about mobile application development. It has been in my mind for quite some time now. Before going into discussing my experience on these technologies I want to give a brief about my background.
So, let's dive into the technologies!
I don't think it's fair for me to write about Cordova since I'm not an active developer for the past 4 years. Back in the days, a simple animation using CSS3 Keyframe animation was not working as intended in Android devices. Since they were using the default browser and not the Chromium it was intended to run in. Since those days, Cordova has evolved and started to ship itself with a smaller version of chromium inside itself.
Being able to run your website as a mobile application using Cordova was and still is a really interesting and fascinating feature for most of the web developers who just wanted to try the mobile application development.
Browser layer of the application and the communication between the native code through it.
WKWebView being the only browser support for iOS devices and the inconsistencies between browsers (Android vs iOS).
Due to constraints of the iOS platform, all browsers must be built on top of the WebKit rendering engine.
- All communication must go through the HTML Rendering Engine (in iOS: WebView) and causes the performance of the application to have a strict correlation with the browser.
When React Native was first released it was quite a hype. The technology was unstable, but the promise it brings with it was quite fascinating!
Before continuing to my thoughts on React Native, let's dive into the React Native ecosystem.
Up until October, Facebook was using its own fork of open-sourced React-Native. Since it came with extra pullbacks and effort, they switched to using the open sourced one. (You can see some issues where a Facebook developer doesn't encounter a specific bug, even though the same functionality was used inside Facebook itself, but because of Facebook using its own fork.)
Facebook releases a new version every month, up until September (I guess). After that, they started to release every 2 months (as far as I observe).
The breaking changes in React Native caused my native code to misbehave due to unknown changes made by react-native-git-upgrade module which React Native and Facebook suggests to update the core itself.
It's main dependency React and inconsistencies between the React-Native core and React.
React still doesn't follow the Semantic Versioning. From my perspective, software which is 4 years old, shouldn't be in 0.5X.XX.
Inconsistencies with native modules due to the breaking changes that happen to React-Native core a lot. (This is one of the main reason that React-Native defends of it being in 0.5X version, but this is again the main reason to use Semantic Versioning: to keep track of breaking changes and to inform developers about the ecosystem and deprecation)
It's quite unfair for me to judge a language by it's cover since I've been writing it for the past month but let's give it a shot.
I had a quite prejudice since I thought React-Native or Cordova was doing the same exact thing as Swift: A mobile application.
Every code written in Swift has a purpose. Yes, even the UITableView. It creates pain for new developers to get used to it and forces the user to use mainly XCode for development, even though there are solutions on the internet for using VSCode, Sublime or else.
The auto layout constraints are quite hard for a new developer. There are really great libraries such as SnapKit, Cartography exists which aims to solve this ambiguity, but still not the default way of doing it.