NativeScript: Difference between revisions

Content deleted Content added
No edit summary
{{Dead link}} tag on bare URL refs which return HTTP 404 or 410
Line 25:
 
==Direct access to native platform APIs and controls==
Platform-independent user interfaces are defined using [[XML]] files.<ref>{{Cite web|url=https://docs.nativescript.org/ui/basics|title=The Basics - NativeScript Docs|website=docs.nativescript.org}}</ref> NativeScript uses the XML data structures representing the cross platform abstraction to trigger platform-specific code that directly interacts with the native elements of the target operating system. This means a call to the NativeScript Button API provides a UI abstraction for Button, which directly calls UIButton on iOS <ref>https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/button/button.ios.ts {{Dead link|date=February 2022}}</ref> or com.android.widget.Button on Android.<ref>https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/button/button.android.ts {{Dead link|date=February 2022}}</ref>
 
While application source code is written in JavaScript, TypeScript, Angular, or Vue.js, the source code is not compiled or otherwise mutated. The source code as-is runs directly on the device. This architectural choice eliminates the need for cross-compiling or transpiling.<ref name=visualstudiomagazine20150309 /> Additionally, while the application source code is written in languages commonly encountered in a browser (or in a WebView-contained mobile application) NativeScript applications run directly on the native device. There is no DOM manipulation or any mandatory browser interaction.<ref name=infoworld2893706/>