Live data from Hacker News

Ask HN: How are you building cross-platform (mobile and browser) apps?

news.ycombinator.com

11–20 of 84 posts

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#11
DronaHQ has a container product that runs on all mobile and desktop platforms as well as a web app. http://www.dronahq.com/platform/uec/

Edit: [Disclaimer] I work with them. To clarify, the container is already built, you can build hybrid or native apps on top of that.

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#12
post #11

DronaHQ has a container product that runs on all mobile and desktop platforms as well as a web app. http://www.dronahq.com/platform/uec/ Edit: [Disclaimer] I work with them. To clarify, the container is already built, you can build hybrid or native apps on top of that.

Please add a disclaimer if you have some kind of relationship. DronaHQ is obviously an enterprise solution: price info only on request and it seems the goal is to build the app for you.

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#13
We use React Native for our apps and React for desktop - I'd say about 95% of the Android/iOS code is shared and we're able to share a lot of business logic between mobile and web. Having all of the code together in one repo has worked really well for us and some of the most complicated stuff is shared between all platforms.

If you want to share UI across platforms you could potentially use something like https://github.com/lelandrichardson/react-primitives to do that, but we don't and I'm not sure we'd want to because we don't want to use the same design on all platforms.

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#14
We've built an offline first webapp that is basically a PWA (it's one manifest file away from being one IIRC), but instead of relying on Google to have something installable[1] we also create an Android app which is just[1] a web view hardcoded to the correct URL.

I'm not convinced this is what we'd do if we were starting fresh, I imagine we'd look at React / React Native. However, this definitely works for us for now.

[1] We also deploy to very old / basic phones, so we use this opportunity to bundle our own version of the web view so we can target higher chrome versions.

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#15
Ionic uses Cordova, which you can use directly without having to use the rest of Ionic. You're then free to write the app in React or whatever web framework you prefer.

The only downside is if you do want a native look and feel, you'll need to find a UI library to provide that, but that's no different than if you were writing a PWA.

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#17
Consider taking a look at the Visual Studio tools, which have really matured over the last few years: https://www.visualstudio.com/vs/features/modern-web-tooling/

Specifically, tools for Apache Cordova: https://www.visualstudio.com/vs/features/cordova/

(disclaimer: I haven't used them, but I've heard very positive feedback)

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#18
Ionic can get you the most code sharing. Ionic uses a web view to render the UI so it will never get you the same as a native UI, but it is actually really good. Expect a few delays here and there, though. Make sure to try it out on the oldest phone you plan on supporting to see if you’re okay with the performance before moving forward. Ionic will get you the most code sharing.

React Native is a great for cross platform iOS and Android native. If you want code sharing across native app and web app, look into ReactXP, or come up with your own code sharing technique, which apparently @sdcookie’s team did.

Titanium from Appcelerator also supposedly targets Native and Web.

Also consider focusing your efforts on native and not doing a web app. RobinHood stock trading app went a long ways without having a web app. Just throwing that out there.

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#19
You should consider your target audience and your own resources. For consumer facing apps, I'm not sure an hybrid (cordova / ionic / webview shell) approach is really up to par, as the UX is really challenging to make right and performance will be lacking. That said, a native approach requires twice the codebase and twice the resources (man hours) roughly, so the challenge becomes maintaining feature parity and team expenses.

Apps targeted for B2B users are considerably more flexible in terms of UX, the goal is mainly to help users get stuff done, so hybrid is more viable here. Which is what we usually do with cordova. Some considerations to bear: using cordova, the team doesn't really get much expertise with the proper platform, so problems are sometimes harder to debug because of lack of developer maturity in the platform. You need to design with an eye to light performance requirements, which usually means facilitating inputs and maybe have a separate web interface for complex UI like dashboard and management.

If you absolutely have to share code between apps, your options are:

- hybrid approaches like cordova, or build your own native web view shell and load your web code manually

- react native, which is not v1 yet, and looking at it recently I'm personally not sold on it yet, many unkown unknowns to actually double down and build on it. But that's just my opinion.

- Black box compatibility frameworks like Xamarim, Nativescript and the like. They work by giving a common platform middleware that builds to multiple target platforms. There are a lot of trade offs here, specially the lack of control. If a feature is buggy or not supported there is little recourse.

- I have read some big companies share code via C++ bindings used natively on each platform (loaded in Java and Objective C). I imagine this technically "solves" the problem, as you can share code and build natively, though I have no idea what tooling there is to help with this, and imagine the developer experience gets the short end of the stick.

edit: typos

Re: Ask HN: How are you building cross-platform (mobile and browser) apps?

#20
post #9

Interestingly, Flash/Air seems most-popular cross-platform mobile toolkit for app dev (far ahead React Native): https://blog.appfigures.com/wp-content/uploads/2018/03/11-No... (from https://blog.appfigures.com/ios-developers-ship-less-apps-fo... )

A lot of games have been made in Flash. I'm guessing that a lot of those apps cited are games (which is true for a few other frameworks on that list).
Post reply on HN