- Добавил: literator
- Дата: 2-06-2024, 18:59
- Комментариев: 0
Название: jаvascript Native Interface: Build cross-platform apps with native performance
Автор: Tony Gaitatzis
Издательство: BackupBrain
Год: 2024
Страниц: 194
Язык: английский
Формат: pdf, epub
Размер: 10.9 MB
In mobile development, there is a trade-off between portability code and fast execution. A new feature of React Native called jаvascript Native Interface (JSI) removes that trade-off by allowing developers to write portable code that executes as binary code on the native device. jаvascript Interface (JSI) is a lightweight, general-purpose API provided by Facebook for interacting with jаvascript data types and functions in C++ code. Introduced in the context of React Native, JSI offers a way to call C++ functions directly from jаvascript and vice versa. Before JSI, React Native used a “Native Bridge” feature, which required that developers write native code in the device-native language, for example Swift on iOS and Java or Kotlin on Android. React Native developers who wanted to have the performance of a native app therefore needed to maintain two code-bases for the same features. JSI solves this by allowing developers to maintain high-performance code in only one language: C++. While JSI brings numerous advantages, especially for complex and performance-critical applications, it's worth noting that it requires a good understanding of both C++ and jаvascript, as well as the internals of React Native. As such, it's often used for building advanced features, or optimizing performance-critical paths. This book is intended for programmers, engineers, and technology enthusiasts who want to learn about mobile development.
Автор: Tony Gaitatzis
Издательство: BackupBrain
Год: 2024
Страниц: 194
Язык: английский
Формат: pdf, epub
Размер: 10.9 MB
In mobile development, there is a trade-off between portability code and fast execution. A new feature of React Native called jаvascript Native Interface (JSI) removes that trade-off by allowing developers to write portable code that executes as binary code on the native device. jаvascript Interface (JSI) is a lightweight, general-purpose API provided by Facebook for interacting with jаvascript data types and functions in C++ code. Introduced in the context of React Native, JSI offers a way to call C++ functions directly from jаvascript and vice versa. Before JSI, React Native used a “Native Bridge” feature, which required that developers write native code in the device-native language, for example Swift on iOS and Java or Kotlin on Android. React Native developers who wanted to have the performance of a native app therefore needed to maintain two code-bases for the same features. JSI solves this by allowing developers to maintain high-performance code in only one language: C++. While JSI brings numerous advantages, especially for complex and performance-critical applications, it's worth noting that it requires a good understanding of both C++ and jаvascript, as well as the internals of React Native. As such, it's often used for building advanced features, or optimizing performance-critical paths. This book is intended for programmers, engineers, and technology enthusiasts who want to learn about mobile development.