Hacker News new | ask | show | jobs
by OneFunFellow 2007 days ago
Mobile app development with Ionic Framework v5 [1] and Capacitor (version 3 coming soon) [2].

I have looked into mobile development in years past and I always got the impression that it was a hot mess. An ever changing everything, undocumented everything, tons of languages and frameworks to choose from. I was immediately turned off by how complex, immature, and ever-changing that everything was.

To me, the most important selling point of Ionic is that I can write code once (Ionic UI Framework + Angular or React or Vue), then run it through Capacitor and it spits out a NATIVE mobile app that runs in a WebView (not a PWA, but they support PWAs).

I don't have to know anything about Android or SwiftUI. If I want to access native features (such as camera or location) I simply use a Capacitor plugin. Again, zero native code, the plugin handles it. There are plugins for things like storage, clipboard, file system, haptics, and more.

If you were ever turned off by the complexity of mobile app development take a look at Ionic. If you know HTML, CSS, a JS framework, and can learn their (simple) framework language you can write a fully functional app without knowing anything about the native coding.

[1] https://ionicframework.com/ // https://github.com/ionic-team/ionic-framework

[2] https://capacitorjs.com/

4 comments

Okay. I’ve been in mobile app development pre-iphone, when microsoft had smart phones. Since 2006. Have done native iphone since the first SDK was shipped in 2008. And android when it was available. Did Ionic, xamarin, react-native.

Shipped mobile banking, digital wallets and crypto wallets to 21 million customers, as architect and lead.

And yet, here we are in 2020... still there is this fantasy about xyz framework flavor of the year... write once... run everywhere...

Magical silver bullet to save time and development costs.

Because, who wants to learn the native language for the mobile platform.

And every single code once, write anywhere framework leads exactly to it’s own tradeoffs.

Let’s explore each.

React-native - if you enjoy debugging this is your platform of choice. Have an obscure nodejs open source library you are dependent on? That is being deprecated? Have fun maintaining and upgrading it yourself. Or how about 2000 security warnings you need to resolve... yeah, you’ll code once... and debug everywhere.

Like Iconic? - you won’t when iOS decides to upgrade the OS. And the look and feel and your app suddenly looks like it is a decade out of date. Good luck upgrading the look and feel... re-write on next flavor of the platform.

Like xamarin bc you like C#? Have fun learning microsoft’s unique mobile paradigm. As well as needing to understand how iOS and android paradigm’s work. And debugging across 3 platforms... trying to isolate whether the memory leak is on the microsoft or iOS side of things.

The reality is this. There are tradeoffs. And you are really only trading one pain for another pain.

Learning the native tools and languages are only one kind of pain. And the least painful.

This is the reason why i chose to use basic cordova instead of ionic in my application. I can't use cool out of the box components when building the UI, but i can implement my own UI components using Vue.

There are still some tradeoffs, the javascript webview ui components are not fast as the native ones.

To add. Do as much processing in your APIs as you can see fit. Then your apps are just CRUD, which makes them easier to manage.
What do you think of flutter?
Would ask the same.
Why is this setup better than using React Native? I believe RN spits out not just Android/iOS but also desktop Windows/Mac app code.
I prefere true HTML/CSS over React Native or Flutter because when it is time to integrate the visual prototype of your client, good luke trying to personalize native component that those solutions offer you.
I agree, in the past I always heard that HTML based application are not as fluid as native app, I think it is not true anymore for modern smartphones.

HTML applications also allow you to do great thinks like WebGL and WASM.

Thanks! That's really interesting. I'll certainly check it out. Do you by chance have any learning resource recommendations?