Content deleted Content added
Giacomo411 (talk | contribs) Updated stable release |
Captain Calm (talk | contribs) Filled in 17 bare reference(s) with reFill 2 |
||
Line 7:
| released = {{Start date|2014}}
| latest release version = 7.0.12
| latest release date = {{Start date and age|2020|10|21}}<ref>{{Cite web|url=https://github.com/NativeScript/NativeScript/releases|title=Releases · NativeScript/NativeScript|website=GitHub}}</ref>
| programming language = [[JavaScript]], [[TypeScript]]
| platform = [[Cross-platform]]
Line 14:
}}
'''NativeScript''' is an [[open-source software|open-source]] framework to develop
==Development==
NativeScript was publicly released first in March 2015. Version 1.0.0 followed two months later.<ref>
==Structure==
NativeScript and all the required plugins are installed using the package manager [[Npm (software)|npm]]. Projects are created, configured, and compiled via the command line or a GUI tool called NativeScript Sidekick.<ref>{{Cite web|url=https://www.nativescript.org/nativescript-sidekick|title=NativeScript Sidekick - your faithful companion for app development|website=NativeScript.org|language=en|access-date=2017-10-31}}</ref>
Platform-independent user interfaces are defined using [[XML]] files. NativeScript then uses the abstractions described in the XML files to call native UI elements of each platform. Application logic developed in Angular and TypeScript can be developed independent of the target platform as well. A NativeScript mobile application is built using the node.js runtime and tooling.<ref name=heisede3282619>
==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</ref> or com.android.widget.Button on Android.<ref>https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/button/button.android.ts</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/>
Line 33:
Another notable feature is the use of reflection to handle native API endpoints. Rather than requiring separate binding layers between NativeScript and each mobile platform API, NativeScript uses reflection to gain information and metadata about the native platform APIs. New features added to any native platform API are available immediately.<ref name=infoworld2893706/>
Another way the reflection feature is used is in working with third party libraries. As JavaScript (or TypeScript/Angular) can talk directly to native code, there is no need to write binding layers in Objective-C, Swift, Java or Kotlin.<ref name=visualstudiomagazine20150309 /><ref>{{Cite web|url=https://docs.nativescript.org/core-concepts/accessing-native-apis-with-javascript|title=Accessing Native APIs through JavaScript - NativeScript Docs|website=docs.nativescript.org}}</ref>
=== Angular Integration ===
With the launch of NativeScript 2.0, it is possible to use Angular to build cross-platform mobile applications.<ref>{{Cite web|url=https://www.nativescript.org/blog/nativescript-2.0---the-best-way-to-build-cross-platform-native-mobile-apps|title=NativeScript 2.0 - the best way to build cross-platform native mobile apps|website=NativeScript.org}}</ref> Additionally, when using Angular with NativeScript you have the ability to share large chunks of code between your web and mobile apps.<ref>https://blog.angular.io/apps-that-work-natively-on-the-web-and-mobile-9b26852495e7</ref>
=== Vue.js Integration ===
The Vue.js framework is supported in NativeScript via the nativescript-vue plugin.<ref name=":0" />
== Supporting
* NativeScript Sidekick is a [[graphical user interface]] that builds off of the capabilities provided by the NativeScript CLI. With Sidekick a developer can leverage app templates, cloud-based builds for iOS and Android, and publish apps to the public app stores.
* NativeScript Playground allows developers to experiment with NativeScript in a web-based environment, and preview apps on physical devices.
* NativeScript Marketplace is a curated source of NativeScript plugins, pre-built app templates, and runnable sample apps.
|