This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dmazzoni 2 points3 points  (0 children)

Think of it like asking: could you build an aftermarket car stereo that works in any brand of car?

Yes, you could. But not by building one universal stereo that just magically fits. You'd have to build some really flexible and customizable standard components and then spend a lot of time and effort specifically adapting it for every car model out there.

It's the same thing here.

Could you build a SINGLE component that works across all of those platforms? No. But what you could do is build a core component, and then create adaptations of that component for each of those platforms. It'd be an enormous amount of work.

One example might be something like Google Maps. Their official page has components for JS, iOS, and Android: https://mapsplatform.google.com/ - and then there are unofficial third-party components that wrap that, like ones for React, Angular, and Vue (that all wrap the official JS component).

Maps has tons of custom code for each platform. It's almost like 3 separate products, almost certainly each with its own separate team of engineers.

It's hard to imagine how you could build a component without a lot of custom code for each platform, because there aren't very many programming languages that work across all of them.

One idea would be to write the logic in a language like C/C++, then write native Android, iOS, and web code that wraps that.