词条 | NativeScript |
释义 |
| logo = NativeScript logo.png | name = NativeScript | author = Telerik by Progress.[1] | developer = Progress and community | released = {{Start date|2014}} | latest release version = 5.0.1 | latest release date = {{Start date and age|2018|11|20}}[1] | status = Active | programming language = JavaScript, TypeScript | platform = Cross-platform | license = Apache License | website = {{URL|www.nativescript.org}} }}NativeScript is an open-source framework to develop apps on the Apple iOS and Android platforms. It was originally conceived and developed by Progress.[2] NativeScript apps are built using JavaScript, or by using any language that transpiles to JavaScript, such as TypeScript. NativeScript supports the Angular[3] and Vue JavaScript frameworks.[4] Mobile applications built with NativeScript result in fully native apps, which use the same APIs as if they were developed in Xcode or Android Studio.[5] Additionally, software developers can re-purpose third-party libraries from CocoaPods, [https://android-arsenal.com/ Android Arsenal], Maven, and npm.js in their mobile applications without the need for wrappers.[6][7][8] DevelopmentNativeScript was publicly released first in March 2015. Version 1.0.0 followed two months later.[9] The framework quickly gained popularity reaching 3000 github-stars and over 1500 followers on Twitter soon after the public release.[10] In the meantime, over 700 plugins are available, which are either officially supported by Progress or stem from the open source community.[11][12] The use of Angular is an optional development approach allowing for application source code to be shared between the web platform and mobile platform.[13][14] StructureNativeScript and all the required plugins are installed using the package manager npm. Projects are created, configured, and compiled via the command line or a GUI tool called NativeScript Sidekick.[15] 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.[16] Progress aims for a ratio of 90% common code between the iOS and Android platforms.[17] Direct Access to Native Platform APIs and ControlsPlatform-independent user interfaces are defined using XML files.[18] 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 [19] or com.android.widget.Button on Android.[20] 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.[8] 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.[3] Notable FeaturesNative API ReflectionAnother notable feature is the use of reflection to handle native API endpoints. Rather than require 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.[3] 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.[8][21] Angular IntegrationWith the launch of NativeScript 2.0, it is possible to use Angular to build cross-platform mobile applications.[22] Additionally, when using Angular with NativeScript you have the ability to share large chunks of code between your web and mobile apps.[23] Vue.js IntegrationThe Vue.js framework is supported in NativeScript via the nativescript-vue plugin.[4] Supporting Tools and Services
References1. ^https://github.com/NativeScript/NativeScript/releases 2. ^https://www.infoq.com/news/2015/03/nativescript 3. ^1 2 http://www.infoworld.com/article/2893706/mobile-development/javascript-native-ios-android-and-windows-phone-apps.html 4. ^1 {{Cite web|url=https://nativescript-vue.org/#/|title={N}-Vue|website=nativescript-vue.org|access-date=2017-10-31}} 5. ^http://searchcloudapplications.techtarget.com/podcast/NativeScript-framework-eases-cross-platform-app-development-woes 6. ^http://www.infoworld.com/article/3066900/javascript/nativescript-warms-up-to-angularjs-for-mobile-dev.html 7. ^http://sdtimes.com/sd-times-github-project-of-the-week-nativescript/ 8. ^1 2 https://visualstudiomagazine.com/articles/2015/03/09/telerik-nativescript-beta-mobile.aspx 9. ^http://www.i-programmer.info/news/167-javascript/8561-nativescript-100-released.html 10. ^https://www.nativescript.org/blog/nativescript-1.0.0-is-now-available 11. ^https://market.nativescript.org/ 12. ^https://www.npmjs.com/search?q=nativescript 13. ^http://www.cioreview.com/news/progress-releases-nativescript-20-with-crossplatform-deployment-capabilities-nid-14646-cid-19.html 14. ^http://www.htmlgoodies.com/beyond/javascript/getting-to-know-angular-2.html 15. ^{{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}} 16. ^http://www.heise.de/developer/artikel/Mit-JavaScript-wie-hausgemacht-NativeScript-3282619.html 17. ^1 https://www.nativescript.org/faq 18. ^https://docs.nativescript.org/ui/basics 19. ^https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/button/button.ios.ts 20. ^https://github.com/NativeScript/NativeScript/blob/master/tns-core-modules/ui/button/button.android.ts 21. ^https://docs.nativescript.org/core-concepts/accessing-native-apis-with-javascript 22. ^https://www.nativescript.org/blog/nativescript-2.0---the-best-way-to-build-cross-platform-native-mobile-apps 23. ^https://blog.angular.io/apps-that-work-natively-on-the-web-and-mobile-9b26852495e7 External links{{Portal|Free and open-source software}}
4 : Rich Internet application frameworks|2014 software|Software using the Apache license|Mobile software programming tools |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。