First off, updating NativeScript was a lot more painful than originally installing it. Perhaps this was because when I last installed NativeScript it was before the great io.js - node.js merge - where NodeJs version 0.10 was still the defacto standard and node-gyp (the node build tool for compiling c extensions) was a little more reliable. I understand that there are lot of moving parts in the node world, npm is run by one company (and where the stable versions switched from 1.4.x to 3.3.5 in under a year), node is being run by a Foundation (the stable versions of NodeKs in the past year have been 0.10.x, 0.12.x, and then 4.x) and node-gyp relies upon Visual Studio in Windows and the XCode Command Line tools on OSX. The possible number of combinations to debug the instllation and building of NativeScript is pretty large, but other complex projects (Cordova don’t seem to have the same problems that NativeScript has, I failed installing it on 5 different boxes (two Macs and three windows machines, with different versions of node and npm).
Install of Joy
Eventually the only way I could get it to install was creating a clean VM and installing it there. And I spent some time playing around with the new features: new CSS properties, plugins, and animations.
The New Features
First of all, one of the complaints I had in the my first review was that it was difficult to style things, and I am happy to report that has been fixed. It may seem minor, but one of the ways to not have your app look like it was put together in two minutes is to not have every part of it look the same. While the css is much better, it is not as extensive (obviously) as CSS in HTML and missing a lot of what we are used to in HTML5 but they have provided a lot more to work with now for styling your app.
And know that you would have to convert it to the following Nativescript:
Now you just need to include the nativescript-appversion, and you by installing the plugin you get the iOS version as well. There are 30 odd plugins listed (25 cross platform) on the NativeScript Plugins gallery, and some are as simple as getting the app version, to some that are a little more full featured like the NativeScript-Grid-View. A majority are a couple of lines or less for each platform, yet all are welcome as not only do they make things easier for you they serve as good documentation on how to integrate with the Native Platforms.
Animation is very important in mobile apps, it is so important that in Google’s excellent design spec on Material Design, the first section after “What is material” is the section on animation. It gives clues to the user on what is happening when they interact with the app, and gives clues on what to do next. It can delight the user, or frustrate them if the animation is slow, awkward, or poorly done. NativeScript’s animation will seem mostly familiar if you have used jQuery animate. You can animate 5 properties (opacity, backgroundColor, position, scale, and rotation) with a duration, a delay and an iteration. The one thing missing from the animation is an easing, they have added what they call a “curve” which has to be class specific to the OS (either TimeInterpolator for Android or UIAnimationCurve for iOS). Which means that if you wish to support both devices you have add code like this:
and try to find roughly equivalent classes to do your easing. Why they couldn’t have abstracted easing is a bit of a mystery, maybe it is a feature coming in the future.
Recipe Folder List Recipes Page
Recipe Folder View Recipe Page
Trying to convince myself that I was just not comfortable or familiar enough with NativeScript I downloaded and built all the sample apps, they all look terrible. The best looking app Friends (see below), still has an unstyled title bar:
Friends Sample App
Sure they are sample apps, but, their App Showcase has 4 apps. Three of them are pretty ugly sample apps, only one is available in the AppStore – and it crashes on my phone:
and the rest are pretty feature barren. Has no one in the six months that this has been a product released an app that they can point to in one of the app stores to brag about? The number one recommendation I gave in my last article was to dogfood this framework, and it is pretty clear that no-one is building real apps with it.