💾 Archived View for dioskouroi.xyz › thread › 24932315 captured on 2020-10-31 at 00:47:44. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
________________________________________________________________________________
I wonder if JS could have been a better language for platform-agnostic business logic.
Unfortunately, it looks the best approach is still to inject the JS inside of a webview, which has way too much overhead for background processing.
At my previous shop, we used J2V8(a light weight v8 runtime wrapper) on Android to rull all the javascript business logic(shared with our web code), we only had a accessor methods in Java. No complaints at all, and it was very fast.
Very nice.
I think wider adoption of the "write your app UI in each platform language, and then write your business logic in JS and share it between all platforms" pattern really depends on Android or iOS officially supporting JS (or really Node/V8) as a first-class citizen.
Right now, only companies like NativeScript are pushing it as a framework and their approach comes with for-profit baggage, i.e. “write your iOS and only Android apps in JS!”. Mobile engineers have learned to fear those promises and larger enterprises are unwilling to risk their entire app architecture relying on one vendor.