Why we use ReactJS

September 20, 2018

by  Chris Carreck

When CLD first started developing apps in early 2010, the landscape for app development was far more restricted. iPhone development used Xcode and objective C before Swift came along. As far as Android studio for Android and Windows applications - let's not go there. 2010 was still reasonably early in the smart phone landscape, however, it has always been our mission to produce rich interfaces for iOS and our other platforms.

Here we'll take you through the timeline of CLD's development milestones.

Timing did provide a few obstacles. For example, clients during that time who required both a website and an app, required unique talent from our team. Our developers would need to either cross skill or be highly specialized in one area - such as web development, Objective-C, JavaScript, or even Android Studio. Luckily for us, we have always had a team of very talented developers that were able to cross skill, and with a little bit of patience, able to effectively produce web builds along with native mobile builds.

Then came along Cordova. We were able to use our same core JavaScript skillset and build a suite of apps that could target iOS, android and windows devices on a "single" code-base. This was great news for our team! It meant we could now have developers that didn't need to completely switch from one language and code base to another when producing the same app. We could build the core code using JavaScript and CSS, utilising our developers' expert knowledge working across the full stack, to develop on a single code base to eventually target iOS and android. This sounds perfect, however if it was, we all would have hung up our boots and went home.

Something was still missing. We tried a few different flavours of Cordova and JS frameworks. From here we experimented with Crosswalk for smooth experiences on android, Ionic and Angular, Backbone, Phone Gap, etc. While we were able to produce proficient results, we found there was need for frequent code tweaking.

Following this stage, there were the JS frameworks and libraries themselves, Knockout, Ember, Backbone, Angular, and React were among others we touched on. MVC and MVVM were all the rage in JavaScript, and separating concerns and decoupling logic from the app itself are all good, solid practices when architecting any application. Backbone allowed us to quickly scaffold interfaces and separate logic. Angular, although producing a solid framework to decouple views, services, was not as fast paced as we required in an agency environment. There was a large amount of overhead involved in getting a new, custom angular build off the ground. To quickly prototype UIs and not necessarily have all the moving components in place involved a lot of setup, and this was time we didn't want to spend writing boilerplate code.

Long story short, we tested a few different frameworks. Some worked well, some we weren't confident in, and others still required flavour of Cordova to effectively target different platforms.

We decided to give ReactJS and React-Native a turn. At this stage, both had been in the market for a short amount of time, still relatively less popular than it is today. We found that is much quicker and easier for our team to spin up a prototype, create some engaging UIs for our clients, and get feedback quickly. As we always do in an agency environment: learn fast, fail fast.

It's important to point out - it's not that simple to spin up a demo in React and then quickly turn it into a native app for iOS and Android. The steps to create the React-Native components for each of the platforms you wish to target still exist. The benefit is all the UI code can be written in one place, making it native for that platform. This supports the benefit of a single code base.

With more targeted native code for our platforms, our app UIs feel a lot sleeker in React than anything built with Cordova. Our benchmarks to support our claims? Thousands of hours sitting with our developers, testers, and clients looking at, demoing and using the apps we produce. The experience speaks for itself. There is a definite feel of a richer, sleeker experience in the end result using React and React-Native.

In summary, some of the main advantages we've found from using the React library are:

  • Quick turnaround for prototyping
  • A clean code base able to target web and native
  • Developers can work on any part of our stack more easily
  • We no longer need to use different compilers to get better results on different devices
  • Proven end results for our clients

Be sure to follow us on Twitter @Cre8iveLicence, and if this kind of stuff interests you, then you'll love working with us).