Hacker News new | ask | show | jobs
by WA 2470 days ago
Although unpopular on HN: Cordova-based apps with a good mobile look-alike framework can get you very far for a smallish app.

Advantages:

- truly one code base

- iOS, Android, and web apps

- JavaScript skills are useful

- experience is "good enough" for the average user

Downsides:

- almost no fine-grained control of input controls (like which keyboard to show)

- doesn’t respect users’ accessibility options of the OS

- small differences between the native widgets and the CSS/HTML lookalikes

- not anymore: performance. It’s really good enough on devices of the last 4-5 years

I use Ionic, or more specifically: Stencil with ionic web components.

3 comments

I agree. With good frontend development practices (state management, caching, etc) it behaves a lot like a native app, it's quick to get up and running and easy to maintain. Not to mention you can deploy as PWA/mobile web if it suits the situation.

What framework are you using? Angular or another framework? I'm interested to explore this approach using Svelte.

I use Stencil, made by the ionic team: https://stenciljs.com/

It’s also a compiler for web components like Svelte and a lot like React. You can add the ionic code web components to get animations etc. Try it out, especially if you like TypeScript.

Might have to take a deeper look at it. Thanks!
Excellent recap.

Can you link to one app ported on the 3 platforms (Android,iOS,Web) so we can test performance from a UX point of view ?

Well, you could try the Ionic Conference App (just a demo app): https://github.com/ionic-team/ionic-conference-app
any other real life example besides the provider template app ?
If you want performance Cordova is not going to impress you ...
I used them a couple of times, for that kind of user experience I rather use a PWA.
Yeah, but the average user doesn't know what a PWA is and they want to install an app through the app store. Furthermore, with Cordova, you can also use plugins such as In-App-Purchases or access to more persistent storage (SQLite) instead of what the browser offers.
You can package PWAs via the stores as well, in which case they are able to access native features as if they were browser APIs.
Not yet on iOS, or am I mistaken?
True, only on Android, Windows and ChromeOS.
Cordova can access native features on phones via plugins - database, camera, sensors, etc. As well as use different designs for Android/iOS with the same code via Ionic/F7.