Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Very few large multi-platform applications use separate code bases. Why should it be different for a javascript/React app?


I'm assuming that you mean Linux/Windows/MacOS when you say multiplatform. I agree that for Desktop apps its sometimes okay to use the same codebase (thinking of Blender, Gimp, other open source apps that work across Desktop OSes). Other times there are apps that work significantly better because they utilize an OS's strengths (Pixelmator for MacOS).

The key difference here is that user expectations are completely different between a mobile app, a desktop app (either native or node webkit), and a web app - at the moment I would say that its rare to see any app share the same codebase (not including shared libraries/dependencies) for all of those. As this post shows, its not impossible, but there are still some tradeoffs.

If I was starting a brand new application that needed to work across all platforms, I would still consider having independent code bases sharing a library as a dependency rather than having a single codebase for everything - especially if I wanted to be sure to have the best possible experience for each platform.


The whole "write a shared library, and layer your platform-specific UI on top of it" sounds great in theory and is brought up all the time, but vanishingly few apps actually do this from what I can tell.


In the example app, the mobile variant has completely view code than the two web based variants. The fact that they look and feel similar is a deliberate coincidence more than a consequence of the design.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: