I absolutely love the fact that tools like ionic and Cordova exist. It means that Web Developers like myself can build hybrid applications (apps that work in both web and mobile) without needing to write native code. However, this doesn’t come without disadvantages. Due to this, I wanted to write a blog post comparing its pros and cons.
Pros
- Designing android apps no longer a headache
My experience with native Android was that changing even basic elements, such as the colour of the header bar in your application, meant having to create themes and styles in XML file, and sacrifice a few animals before it worked. Now, I never did any real android development, so it may have just been my own lack of exp in the subject. I know many people are able to make beautiful looking android apps, but personally I find being able to define styling with CSS just like any other web application very helpful. - Plugins are great… Mostly.
Cordova uses plugins to “link” Javascript code to native code in the back end. There are plugins for every feature and platform you can imagine, and even if not, Cordova’s API for writing your own is rather straight forward. - Build management
Cordova creates its own config file for tracking your enabled platforms and plugins. Additionally, it provides commands such as ‘cordova run android/ios’. You don’t need to build your apps using different IDEs and/or command line tools for each platform, Cordova handles it for you. - Frameworks like ionic!
Ionic framework provides an angular code base with native-like widgets you can use. This allows you to have things like tabs, toggle buttons, reorderable lists, etc. in your web application.
Cons
- Plugins only mostly work.
I’ve had to fork and modify every single plugin I’ve used so far on my current project. Some was just adding some extra functionality or extra configuration options, but other modifications were more serious, such as having to fix a crash. Just be aware that when using plugins you may have to hunt a bit to find one that works properly… And sometimes have to fix somebody else’s code yourself. - UX isn’t native
Being able to build and design using web tech is great, but the thing is that if you’re not careful with your UI and UX your app will not look or feel like a native app. This isn’t always a bad thing (for example, Facebook, YouTube, twitter, etc… all their apps look the same between platforms rather than adapting the platform’s native UX logic), but it’s definitely something to keep in mind. If your app’s UX needs to feel as much as a native app as possible, then you should at the very least have a different layout and different front-end interactions for each platform you are supporting. Having said that, Cordova means that instead of writing the same application two or three times and maintaining three different code base (one for each platform), you can just have three different layouts. - Performance and app size
Well, this goes without saying. You’re running your app in a webview, it’s not going to reach native performance. Still, I tried my cordova app in an average android phone, and it performed as well as most native apps from a user perspective, so..
Nice article. You captured the key costs and benefits. Understanding what your end product should be and who will use it are keys to determining if Cordova should be a part of your development system.
After writing an app (Quotastic Quotes and Sayings), I’ve also written about Cordova at http://alamazoo.com/blog/20160609-Building-Cross-Platform-Apps-with-Apache-Cordova.html.
I loved the short and crispy baked information 🙂 Thanks for the info, which UI frameworks would you recommend for Cordova applications. I am a marketing analyst, we are in turn developing a core product in Cordova platform for android and ios platforms. Over the initial design and brainstorming. I could see the whole UI seems to be bit dull. I do understand the limitations over here, but I would need your advice over this. Angular Js mobile, Ionic using these front end frameworks. Will we be able to get a reasonable look and feel?
Thanks