Hacker News new | ask | show | jobs
by dgellow 2512 days ago
It depends what you mean by “re-writing the same app”. In general you can have the core features written in C++, thus available everywhere, then write a platform specific layer on top of this. That’s a quite common approach, and if done correctly (that’s not a trivial task though) allow you to target any platform without too much effort. But yes, you still have to maintain a bunch of stuff for each platform:

- implementation of the platform specific layer, supporting all the quirks of the target platform

- testing setup

- build system (some platforms have a lot of weird details to take in account)

The cost-benefit can be ok or terrible depending on the project. But for example for games, where you will draw your own UI anyway, that’s very common, and as far as I know that’s also what Microsoft is doing for their Office applications: common core in C++, then platform specific C#/Java/Objectice-C UIs.

1 comments

The expectation level for UIs on mobile devices has been set very high. There is a lot of detail to get right in order to deliver the experience that people expect. That UI specific work is very time consuming.

It doesn't really matter what else is going on in your app, if that work can be done more efficiently to produce a more consistent result, then that's the decision you make.

> work can be done more efficiently to produce a more consistent result

Often with frameworks like React Native or Flutter, it means inconsistent UX bugs on each platform. Why do you think Facebook and Instagram and Airbnb abandoned RN in all their primary interfaces?

The "more efficient" implementation might lead to consistency across platforms, but people are pretty tied to the phones they have. Things like dropped frames, slow scrolling, UI locks, all have a subtle effect on the user whether they can point it out or not, and you're more likely to have those problems by diving in to these frameworks without understanding the underlying platforms.

This isn't argument to share no code whatsoever. But so many people who immediately turn to these frameworks either want to ship something at the expense of UX/design, their app is so small that it doesn't matter, or they have no idea what they're getting into.

That reads a bit like “we know what people expect from a UI but it’s hard.”

If we know so much about what they expect, why is it still hard?

I wonder if all the trend chasing is really just making busy work and getting in the way of truly standardized and dumb simple building of software.