4 ms·
We use JavaScript for sharing code between devices(iOS & Android), browser as well as the server. Surprisingly, we haven't faced any of the problems, that Dropb
by lewisjoe 7y ago
We use JavaScript for sharing code between devices(iOS & Android), browser as well as the server. Surprisingly, we haven't faced any of the problems, that Dropbox claims to have faced (https://blogs.dropbox.com/tech/2019/08/the-not-so-hidden-cost-of-sharing-code-between-ios-and-android/ https://blogs.dropbox.com/tech/2019/08/the-not-so-hidden-cos...).
Pros:
1. Sharing native APIs with JS runtime and vice versa, was well supported & trivial to implement.
2. Easy to find skill-set.
3. We can run the same code in browsers as well.
Cons:
1. The app will be slightly heavier in Android (as V8 has to be bundled with the app. iOS allows using native JsCore runtime.)
2. The shared code runs slower (Obvious, because dynamic language).
- panpanna 7y ago> as V8 has to be bundled with the app. Cant you make use of Webview somehow? It has the benefit of being updated from the market if a security issue is found.