Developing: First mobile app
Recently had an idea for a very simple mobile application, having been a runner for some time I already had an app for finding running events, but when I recently took up cycling I was surprised to see that nobody had created something similar for cyclists. While probably not a massive need, it is a nice things to have as most sites do not cover all available events, so a single source is handy.
As it was my own project, I decided on the riskier approach and went for Ionic2, which at the time was still in beta, biggest reason for that was the idea of killing 2 birds, maybe even 3, this way I would gain experience with IO2 and learn Angular2 in the same breath as well as hopefully end up with a pretty decent app.
The process started out quite simple, getting most of the view components setup and working was easy enough, the complexity began to come in when working in actual logic and reusing the components I had written, I quickly became unimpressed with what I believe to be extremely silly changes Angular made for V2, things that used to be dead simple like providers (formally services) had developed additional steps that to me seem quite unnecessary, like having to import and bootstrap a service within the parent layer (formally run method), before I could import and use it within a component, and unfortunately being in an RC state, it was quite frustrating having to find solutions to problems that quite frankly should never of existed to begin with.
In the end I persisted, not one for giving up easily, I figured there had to be a way to win within this scenario, so I carried on with the project and managed to get what I felt was a decent first stab completed.
As this project was the precursor to a larger idea that a friend and I were working on there was some waiting to be done before it could be submitted to the store, some general copy and designs and such.
During this time, I had heard about React Native from one of the guys at work, and as the project I was on was a React one, it seemed like a good idea to look into this, I was impressed with the idea of coding in JS to yield a native result.
React Native also explicitly uses flex to control it’s layout, which is quite fantastic, but a little complicated when you are not familiar with it and its caveats, this is made even more complex by the lack of inspect tool that I had become so used too, a bit of a time rewind having to build layouts with the old ‘Save and refresh’ method, as the debugging version of the application is still an APK that gets installed onto an android emulator, or physical device if you connect one up. You can still make use of a browse for some debugging, but that is limited to what can be done in a console.
It did take a bit longer to develop the actual application in React Native, with the additional complexities, but the end result was a much better performing application.
Comparing the Ionic2 and React native applications, the most noticeable difference was start time, the Ionic2 took nearly 7 seconds before the first screen was displayed, while React Native was far closer to 2. From a users perspective, an application loading 3x faster is an absolute no brainier.
If you are looking for something that yields a truly native result, a good option to look into would be Xamarin. I have no personal experience with it, but it has got a few more years under it’s belt than React Native which is currently still in RC, I would expect that in some cases the performance would be better at this stage and it is likely that it has better/more support within the specific OS’s, only time will tell what React Native can really do.
Lusus on Android | Lusus on IOS (Coming soon)