I would very much like a breakdown of the main differences (capabilities) between Trinity (Ionic) and React-Native. Why would someone chose one over the other. As far as I understand, the Dapps inside Trinity run entirely inside the Elastos Runtime giving the access to all its features VS React-Native framework which only have access to Elastos Runtime via the Elastos Carrier.
Hi mate, great question.
I am not 100% sure on this, but my understanding of Ionic vs Native Apps are as the follows:
Trinity Browser is just that; a browser: and Ionic, allows apps to create Web Applications (or web sites), with web components for use within a browser, that when used within a Mobile/Android/IOS app, is just wrapped with a Web View component. It’s internal framework is also built for the app being used via a Browser, but can also display the application on Mobile/Android/IOS, which is why the Mobile/Android/IOS version of the application just wraps itself within a Web View Component, and functions smoothly. (if that makes sense?)
So Trinity is built for Apps built within Web Views, specifically browsers, that is then rendered in such a way when packaged inside an app, that it behaves the same way as it would within a browser. But, it can also display Native/Compiled Apps, which are apps that are built with shared code between it’s Web Applications and Android/IOS/Mobile Applications. The code that is shared between Web Applications is compiled into whichever corresponding components serve the same purpose in it’s Mobile/Android/IOS views.
NativeScript or React Native allows you to build a reusable code set (either starting with your Mobile Application code, or your Web Application code), but these applications are built using a set of specific mobile components, and a specific coded objects to help aid in development and design.
If anyone could clarify any of the points I’ve made or is able to correct me if I’ve made a mistake, please do not hesitate, thanks!
Here is a guide on Ionic vs React Native. I think it boils down to that react native is just more performant.
Thanks for sharing @ccoombsesmail. It’s interesting to see that callbacks to native code can affect Ionic performance. It seems to always be a constant that the level of difficulty of anticipating every user action (in Ionic’s case, the developers) is near impossible.
If I may ask, have you used Ionic? I am not sure in which use case Ionic would be advantageous over Angular/or React, despite doing my fair share of research. It’s re usability is suppose to be great, but beyond it’s use displaying extremely simple apps, I cannot see any advantage of using it.
Thank you for your answer. I have some difficulties to envision what are the advantages of running Trinity/Ionic apps in the ELA runtime compared to no runtime. More precisely:
1- What difference does it make for the data storage?
2- Can I have easy access to Elastos sidechains via React native projects?
3- Difference in security?
I feel like some sort of a guide would be useful to orient developers of what platform they should build on depending on the requirements.
Both Ionic and react-native are the bridge between the mobile native and JS.
Ionic use webview to render UI. that means all of the UI is rendered by webview or browser.
React native is different. you could consider it as a translator to transform the JS to native language. everything is rendered by native UI component. there is no webview for RN.
Cause of above. Ionic could dev fast, but the UI performance will be a problem for real end users. And RN need more cost to dev an app. But could support higher performance to UI render and make app running smoothly to support better user experience for end users.
This is the main difference for Ionic and RN. All of other features, like Data Storage, native capability and security are basically same.
For currently, Ionic has more plugins for elastos. And RN for elastos is only Alpha version. only support the carrier and wallet plugin. others need dev to push.