The Question
I’ve recently started developing mobile hybrid applications (meaning HTML+JS+CSS web applications compiled into a native mobile app) and after researching for a bit, I’ve gotten a hang of the process and learnt a few tips and tricks along the way to be able to quickly ramp up a mobile app within hours.
Ionic and Onsen are two popular UI frameworks that provide a feature set to assist you in building common UI elements such as lists, forms, checkboxes, etc…
In this post I want to give my own experience of using the two in a technical format and some things I’ve discovered. If there are specific topics you want me to go through please feel free to comment below.
Ionic Framework
I started with this framework after a bit of research.
- Predefined starter templates are available. There are also command line options to customize your mobile app, but I think in general they’re mostly handy wrappers for existing Cordova commands.
- The framework offers clean user interface elements that mobile developers can use to quickly layout simple informational hybrid apps. However, from an aesthetics point of view I’d personally slightly prefer Onsen UI, but others might disagree. (More on this in the Onsen UI section)
- The documentations are excellent as it covers a lot of the basics and the support forums are far richer than Onsen UI that dwells deeper into more complex scenarios such as mapping, gestures, customization etc..
- it does have it’s fair share of “bugginess” due to it’s nature of trying to wrap itself around AngularJs and force you to use it’s directives for it’s functionalities. Although most of these issues I’ve encountered has been encountered before by fellow developers in the forum section.
- Further to that point, it seems to assume your app will be structured in a hierarchical fashion where you’d define an outer shell, and inside that shell you’d have a toolbars shell, and each button would load an inner page. While this works for simple apps, you might stumble into issues when dealing with maps, for example.
- Probably because of that, I felt that Onsen UI performs slightly faster than Ionic in terms of app/page loading and navigation animations between pages.
Onsen UI
In my second attempt I tried out Onsen UI. I was first attracted to it due to purely aesthetics.
- Similar to Ionic, Onsen provides several starter templates called Page Patterns for you to copy and paste into your project. I actually find this easier to work with than Ionic as I only need to copy the pages that I need, whereas with Ionic you’d be expected to download a “starter package” and then delete the items that you don’t need.
- Onsen is also not a big overhead over Cordova as Ionic because Ionic tries to overlap a whole framework of page loading onto Cordova.
- If you’re familiar with JQuery Theme Roller, there is a similar tool Onsen Theme Roller for you to customize your theme. They’re beautifully designed that in most cases you only need to select your color theme for your project and you’re ready to go.
- The documentation also covers mostly the basics but you might find support to be lacking as this hasn’t been around for as long as Ionic. Also sometimes if you google for specific issues you might find resources in Japanese as this project was originally based from Japanese developers. Having said that, I find the support for Cordova to be quite relevant for Onsen as well in most cases as Onsen don’t add that much logic over top of Cordova.
- As mentioned on top, the performance feels more fluid and more like a native app when developing with Onsen UI.
- It probably doesn’t have as many user controls as Ionic, but on the other hand I find it’s less cluttered and the resulting design would probably be more elegant as it’s confined to a standard. Some with little design skill as me might find this an advantage.
The Verdict
As you can guess, I’m more in favor of Onsen due to it’s simplicity and overall it’s readily useful for the design-challenged developer.
If you’ve got any questions or comments about using each feel free to leave comments below.