15

I'm currently lost with all these hybrid mobile app frameworks. They all sound awesome, but I can not find any real information about the use cases and main differences.

Can someone explain them to me or provide me with great ressources, especially about the use cases?

I know of these ones: Apache Cordova, Ionic, PhoneGap, Steroids (AppGyver), Supersonic (AppGyver), React Native and the new Microsoft Ace (http://microsoft.github.io/ace/).

Disclaimer: It's possible that I mix them completly up and they don't have anything to do with each other, because I'm so lost.

Simon Knittel
  • 1,730
  • 3
  • 15
  • 24
  • Make a spreadsheet with a column containing {popularity, learning difficulty, test support, build setup, deployment difficulty, scalability, api size, learning respurces (books/tutorials), core use etc..} then rank each of these 1-5 for each framework. Narrow down then try out the finalisists by building something simple in each – Don Smythe Feb 25 '16 at 22:38
  • Check out [this](https://en.wikipedia.org/wiki/Mobile_application_development) wiki for comparison on the cross-platform support tools. – Voicu Feb 25 '16 at 22:42
  • Check out this answer (http://stackoverflow.com/questions/33286451/phone-gap-vs-react-native), which may point you in the direction of Hybrid vs React Native, but this is a broad question. Most of the ones you listed are all cordova except for React Native – Nader Dabit Feb 25 '16 at 22:43
  • Thank you so far for your input. I will try that out with the spreadsheet. When they are all based on Cordova, what do they distinguish from each other. Do they give me some kind of a higher level api? – Simon Knittel Feb 25 '16 at 23:11

2 Answers2

36

I've been researching this very topic for at least a couple years now and have been wanting to write up a thoughtful blog post summarizing what I've learned, but it never seems to reach the top of my priority list. I'll provide a short summary here.

The Three Classes of Hybrid Apps

  1. Hybrid via Webview
  2. Hybrid via Cross-Compiled
  3. Hybrid via JavaScript Core

NOTE: I'm sure there's are better names for the above, but this is the best I'm coming up with at the moment.


Hybrid via Webview

Typically, these are the cordova (aka phone gap) based apps you mentioned above such as Ionic, TouchstoneJS, Meteor, and AppGyver Steroids. In fact, Steroids is built on top of Ionic if I remember correctly. These apps attempt to solve the hybrid problem by mimicking native-like components (buttons, list views, drawer layouts, tab views, etc) using standard web-based technologies (html, css, javascript). To access the devices native components, they use a bridge called cordova, which exposes a javascript api to native components such as camera, gps, location, vibration, etc. This is a robust community and if you need access to a native component, you're likely to find a cordova plugin that will meet your needs. The challenge for these types of apps is and has always been performance. Because they render the entire app in a WebView (basically a fullscreen browser window without the chrome), it only has a single thread to render the entire page plus execute any animations etc. In the end, because the components are close, but not quite like native components, and because performance is close, but not quite as slick as native performance, these apps tend to fall somewhere in the uncanny valley. They sort of look and feel right, but they never really are.

Hybrid via Cross-Compiled

Examples of these would be Appcelerator's Titanium and Xamarin. These apps tackle the hybrid problem by abstracting native apis into a common language. For Titanium, that language is JavaScript. For Xamarin, that language is C#. So to write an Android, iOS, Windows, and Desktop app in Xamarin, you'd write all your code in C# using their abstractions (APIs) then cross compile them into actual native apps. These approaches have the right idea, but many would say they fall short when it comes to actually implementation. Though personal experience with Titanium, I found actually building an app was quite painful because you're dependent on their abstraction. If there's a bug in their abstraction layer, you're stuck... until they fix it.

Hybrid via JavaScript Core

There are only two examples of this that I know of, Facebook's React Native and Telerik's NativeScript. This is the future of mobile application development in my opinion, and if I were you, this is where I'd focus my energy. Both of these attempt to solve the hybrid problem similarly in that in each case the developer ultimately writes JavaScript to create native components, but each takes a very different approach. React Native translates your JavaScript to Native through the RCTBridgeModule, whereas Native Script gives you direct access to native apis through some clever trickery in the JavaScript Virtual Machines. I've not worked with NativeScript yet, so don't know how mature or performant it is. I installed their example app and it felt a bit sluggish to me. I think one of it's coolest value propositions is that it literally gives you 100% access to native APIs (mind blowing!). I have worked extensively with React Native this past year and I am super impressed. Both are still very young still and will certainly mature.

Useful Resources

Community
  • 1
  • 1
Chris Geirman
  • 9,474
  • 5
  • 37
  • 70
  • I disagree strongly with lumping Appcelerator and Xamarin in the same bucket. Appcelerator is less cross-compiled and more interpreted at runtime. They rely on a JS Engine to interpret the Javascript and translate to native in real time. They also provide a complete abstraction layer for the UI, requiring that you build the UI with their widgets. Xamarin compiles fully to native. On iOS it compiles to bytecode, while Android deploys a Mono runtime that lives alongside the Android runtime. Also, Xamarin provides 100% access to all native apis, leaving the same level of access as pure native. – Jared Feb 27 '16 at 03:52
  • Wow, thank you very much. You should definitely write this blog post, it's a very interesting topic. I'm wondering in which category Microsofts Ace (https://microsoft.github.io/ace/) is located. It sounds like the second with a bit of the third? – Simon Knittel Feb 27 '16 at 10:47
  • 1
    Thank you for your encouragement, I do plan to write it. I hadn't heard of ace yet, but I will look into it. It looks unique. Not quite sure how it fits in just yet, but looks promising. Unless it catches on though, it won't matter how good the tech is unfortunately. React Native is probably the best tech that has also caught on and has momentum. – Chris Geirman Feb 27 '16 at 13:01
  • useless comment: I would also like to read a blog post that also covers "'cordova with ace' vs react native vs xamarin" – Darren Aug 17 '16 at 00:08
  • There is also the two Tabris products http://developer.eclipsesource.com/tabris/ and https://tabrisjs.com/ (Hybrid via Cross-Compiled and Hybrid via JavaScript Core respectively from what little I know about them) – dancampers Oct 20 '16 at 09:11
  • Thank you for this clear categorization. One other point/dimension is the possibility of continous and consistent developement from building Web Site to Application or vice-versa. Usage of Webviews can ensure you to have the same code running on browser and apps, speeding and managing your code in a consistent way. – tit Nov 19 '16 at 09:21
  • @thipages You're welcome! And absolutely, if that's a requirement of yours by all means, frameworks which rely on webview may be the right tool. React Native bridges that gap too with packages like this https://github.com/necolas/react-native-web – Chris Geirman Nov 20 '16 at 04:20
  • Nicely explained. I am working on Ionic "Hybrid via Webview". Do you think right now "Hybrid via JavaScript Core" is better than "Hybrid via Webview". – vntstudy Feb 17 '17 at 05:30
  • @vntstudy I guess it depends on what sort of "better" you're referring to. I'm sure there are some use cases where webview makes sense, but I'd have a difficult time justifying it. Maybe if there were some cordova plugins that matched my use case perfectly and I was less concerned about performance or avoiding the uncanny valley effect. Personally, I think JS Core is the future. – Chris Geirman Feb 28 '17 at 05:10
0

My personal experience with hybrid frameworks like react-native, is that, honestly, they are great, but...

  • User experience is very close but not equals compared to native
  • Native platforms updates and features will wait for framework updates
  • If you need to extend, in most cases could be a pain

In my company we have created a framework that allows to develop hybrid applications that share business logic, implemented with flux pattern. The UI, however, is completely native.

For more information visit https://github.com/bfortunato/aj-framework It's completely open source.