3 ms·
IME for a lot of apps, most of the development is the UI. Lot's of apps have most of their business logic on a server these days anyway. The problem is not typi
by nicoburns 5y ago
IME for a lot of apps, most of the development is the UI. Lot's of apps have most of their business logic on a server these days anyway. The problem is not typically how to share business logic, it's how to avoid writing 5 different UI's that do the same thing.
- pjmlp 5y agoHave the UI defined in JSON or whatever rocks your boat, even HTML, but then map those concepts to native widgets. Some native apps on Android/iOS do exactly this, with UI coming from Web API calls.
- nicoburns 5y agoIsn't this exactly what a system like react-native provides? Just off the shelf for commom patterns, and backed by a turing complete language. If you have yo build out the UI toolkit yourself yhen you haven't really saved much.
- pjmlp 5y agoNot at all because it isn't native to the platform. These solutions use the native SDKs of the platform directly. So you are e.g. using Java/Kotlin on Android and Swift/Objective-C on iOS. React native brings JavaScript and VM for the ride.
- nicoburns 5y agoIs a JavaScript VM really that different to intepreted JSON files? With react-native, the UI controls are using the platform native toolkits, there's just an abstraction layer on top. Checkout https://github.com/gorhom/react-native-bottom-sheet https://github.com/gorhom/react-native-bottom-sheet for example.
- pjmlp 5y agoDefinitely, because first JSON was just a possible format, secondly, whatever format is used, it is serialisation format for a native language, using the native APIs of the platform. There is no interpretation going on. The abstraction layer for react native has JavaScript engine in the middle, plus a marshaling layer to go through OS APIs, and on Android is double slow, because NDK only has game related APIs, anything else requires a second marshaling call to go through JNI.