4 ms·
Sorry, but web, webview wrappers, and JavaScript (+ TypeScript) is pretty much objectively the poor man’s native. There’s just no other platform which targets n
by armchairhacker 4y ago
Sorry, but web, webview wrappers, and JavaScript (+ TypeScript) is pretty much objectively the poor man’s native. There’s just no other platform which targets nearly every device, is super easy for beginners, has nearly as flexible layout, has huge community support and tooling, and looks “normal”. Nothing remotely compares to JavaScript and web ubiquitousness.
What are you going to do? Write your cross-platform app in C++ and Rust? Write your own macOS and Windows and Linux and iOS and Android bindings, or use some shoddy low-level buggy third-party libraries? Reimplement of flexbox and/or struggle with layout and alignment issues? Use third party dependencies for style, network, lifecycle, and everything else you just get automatically in modern browsers?
What if you’re an entry-level developer or startup hiring entry-level developers? You can’t expect a beginner to deal with these gripes and edgecases alone, let alone on top of the gripes and edgecases of a low-level language. And, more beginners already have experience in web dev vs in C.
Or maybe you decide to use Java. Except Java doesn’t target mobile. Well it does with RoboVM, but then you’re stuck with Java 7 and other limitations. And you have to ship the JVM, and your UI is basically guaranteed to look like garbage (unless you’re JetBrains), and you have to deal with Maven or Gradle. But if you used JavaScript, everyone has a working web browser.
Or maybe you use Kotlin or Scala or GHCjs or another framework which claims to target all platforms. Except last time I checked, these just do not work good and have much support for truly every platform. In fact they have most of the same issues as Java. Targeting 5 platforms is hard and tedious, writing a half-functional universal adapter for 5 platforms is nearly impossible.
Now if you do go through with something other than web and manage to target all platforms, you get a faster app, and the code probably is nicer and easier to extend. Except you don’t really care about speed or long-term extensibility. You care about making an app as fast as possible, targeting the widest audience possible, and making people want it (and people usually choose good looks, which is really web-styled looks, which your app doesn’t have).
And you care about marketing, so you have to learn web design and make a website anyways. And no matter what tool you use, when you sell your app, people have to spend a whole 10 seconds downloading and installing it, and many people are too impatient to wait 10 seconds. Meanwhile you could’ve wrote up some garbage using nextjs and PWAs and Firebase and maybe Electron and garbage JavaScript in like 5 days, it “just works” out of the box (issues come up a few months later), it loads in 2 seconds after clicking a single link, and you get the website for free.
Yeah, I hate JavaScript and targeting browsers as much as the next guy, and I much prefer to (and do) write stuff in other platforms. I wish there was a good alternative. But like it or not, web right now is absolutely the “poor man’s native” and beats everything else out of the water. Write your app for a specific platform, write a non-native (like with Java UI), or invest years into your cross-platform truly native product, but “poor man’s native” is web.