With the March announcement of the Apple Watch, hype around the new wearable simply couldn’t be any more deafening. Couple that with Android Wear, which has been out for some time now, and you have a situation that is unavoidable: there is a new screen size and the tectonic plates of computing are shifting yet again. More disruption in a world that is already desperately trying to keep up with all of the devices, resolutions and capabilities.
If it wasn’t official before, it is unavoidable now: we have a cross-platform crisis on our hands.
But before we dive into that, let me explain why the Apple Watch is actually not nearly as disruptive as you might think.
Watches introduce an entirely new type of interface. These new devices with minuscule screens have sent us all back to the drawing board. Is Responsive Design now a throw-away concept? How are we going to cram this Bootstrap site onto someone’s wrist? Some are even saying that we need to rethink the format of our HTML emails since they will now be on an even smaller screen than before.
The truth is, the Apple Watch is not meant to be your primary mobile device, and that’s really good news for developers.
Think of like this: wearables largely free developers from having to worry about an interface. Right now, the Apple Watch essentially supports a very limited number of UI widgets and interactions. The iPhone was a whole different story: ListViews, TabStrips, Switches, Drawers – none of us had seen any of these things before. It was an entirely new, and in many ways it was a much more complex interface.
The Apple Watch is none of those things. It is intentionally simple and as of the time of this writing, completely dependent on the iPhone to function. Simply put, the Apple Watch is mostly about notifications. This makes your job as a developer much easier since you can focus on the function and not the form, which is where hybrid developers tend to expend a lot of energy.
Communicating between Cordova applications and the Apple Watch is possible today thanks to a plugin from Lee Crossleythat provides a message passing interface. The primary limitation at the moment for hybrid (read Cordova) developers, is that a watch interface cannot be built with Cordova since the watch does not support a WebView.
We’ve been in the hybrid game for a long time at Telerik, and we’ve been thinking about this one carefully. How can we provide Cordova developers with a mechanism for building mobile applications without excluding wearables? We think, at least for now, that the answer lies in templates.
The idea is that since the watch interface is so simple, we can provide watch interface templates out of the box. All the hybrid developer has to do then is to select which template they like. What would a template look like? We’re still defining that, but you could image some that are…
…and those are just a few. The trick is providing the right combinations so that all the developer has to do is to provide the information to the template.
By the way, if you’ve ever wondered about how Apple got that Salesforce chart on the watch during the keynote, we wrote an article about getting charts on your Apple Watch apps back in early February.
We’re also investigating ways to make it simple for developers to send a push notification from our Backend Services and have it seamlessly go all the way through to the watch template without the developer having to do any plumbing.
Now let’s turn our attention to NativeScript for a moment, because there are some very exciting possibilities when it comes to truly native applications built with NativeScript.
Storyboards are a concept that is unique to iOS. They allow the developer to visually create the user interface and flow of an application. In a traditional iOS application, a developer could create visual elements either programmatically, or with storyboards. In a Watch Application, the only way to build the user interface is with a storyboard.
This presents a challenge, but it’s not like that’s new territory for NativeScript.
The team has already started proofing out what it takes to accommodate storyboards and extensions in NativeScript. You can see some early POCs in the NativeScript repo. In addition to supporting storyboards and extensions, the NativeScript team is also considering offering templates as well to facilitate the fastest watch development experience possible.
Thanks to the extensible nature of NativeScript, really anything goes.
If there was a strict device policy at your place of employment, it’s destiny is now way up in the air. Wearables are the most personal computing device any of us have seen so far, and they are only going to further the mandate on developers that applications work cross-platform.
It might have been doable to write an iOS and Android app, but now an iOS app, Watch app, Android app, Android Wear app? This, my friend, does not scale.
Sooner or later we’ll be writing apps for phones, watches, glasses, toe rings and anything else we can find good reason to turn into a wearable. If you were thinking about making the switch to a cross-platform development strategy such as Hybrid or NativeScript, you can feel confident that the underlying architecture of those will support the next generation of wearable gadgets.
Header image courtesy of Apple PR