Part 3: Cross-Platform Mobile App Frameworks – NativeScript
In Part 2 of this article series, we explored the Xamarin mobile app framework as well as its advantages and disadvantages. Now, in Part 3, we will conduct a deep dive into an alternative mobile app framework: NativeScript.
- Access to Angular data binding, dependency injection, reusable components
- TypeScript is a strongly typed, object-oriented language
- Uses NativeScript Command Line Interface(CLI)
- Uses Visual Studio Code
- Lightweight but with a lot of similarities as Visual Studios
- Use native components and has access to native device API
- Uses XML based markup language similar HTML
- CSS style styling
- Uses Node Package Manager for plugin Support
- Large assortment of opensource plugins
- Live syncing of code changes during development
Developing on NativeScript is great because it allows you to use your web development skills to create a cross-platform native app. You can use Angular and gain access to powerful features such as data binding in the UI, dependency injection for the service architecture, and building reusable components which can be shared across multiple apps.
NativeScript uses an XML based markup language which closely resembles and functions like HTML to create the screens and UI. It also uses a small subset of CSS to style the screens. It comes with some standard views which are wrapped around the corresponding native component, and gain access to native API to interact with the component. Again, Button is actually rendering an android.widget.Button and UIButton but you use what looks and feels like HTML to create your interface instead.
The NativeScript views offer a common API which can interact with the native components and style them in the form of CSS. However, you don’t get access to all the selectors and properties offered in CSS. What you get is the ability style and access native components and properties in a way like how you would on a webpage.
NativeScript currently has a fair amount of opensource plugins available for different features you may want to leverage, such as media or music player plugins, multiple upload functionality, and even face recognition plugins. The list is fairly comprehensive and growing; however, if you can’t find a suitable plugin on the list, you have the option to create one as well. You can access the list of NativeScript plugins at: https://market.nativescript.org/
- NativeScript apps are larger than native apps
- Some buggy opensource plugins
Some of the disadvantages with NativeScript include having a larger app size than native. When building the APK/IPA, you should run WebPack and Uglify to reduce the size of the application.
To build for the iOS side, you will also need a Mac running macOS. Again, you will also need to set up a developer account and get a paid developer license to register your Apple devices so that the app can be tested on them.
Opensource plugin support is nice, and there are a lot of options from which to choose in order to add functionality to your app, but we have encountered some bugs with some plugins that required some fixing or exclusion from the app.
Coming Up Next
Next, in Part 4 of this Cross-Platform Mobile App Framework article series, we will bring it all together and look at which platform will be the best to choose for you and your team.
Imaginet is your trusted technology partner who turns your business innovation ideas into reality. 20+ years | 1200+ satisfied customers | 2500+ successful engagements. Specialties include Web Application Development, Mobile App Development, SharePoint services, and more. Located in Dallas (Irving), Winnipeg, Phoenix, St. Louis, and Calgary with services offered worldwide. Contact us today at email@example.com or 1-800-989-6022.