Cordova In Visual Studio
Written by Alex Armstrong   
Wednesday, 14 May 2014

Microsoft really is backing all the horses. An announcement at TechEd reveals a preview release of Visual Studio support for Cordova. How many ways do you need to create a cross platform mobile app?

The Microsoft environment has never been known as being welcoming of cross platform development. It has been promised at various points in the past - the most notable recently was of course Silverlight and we all know where that ended. Also this is the company that refers to an app that can run on Windows 8.1 or Windows Phone 8.1 as "universal". 

However there is already a way, if not a 100% Microsoft way, of doing cross platform mobile development within Visual Studio. With the help of Xamarin you can write C# applications that run on Windows Phone, iOS and Android. The only problem is that as native applications you have to do some work to craft the UI on each of the platforms. You can share core functionality but you still have to write custom UIs. 

If you are willing to give up the idea of a 100% native app then you can already create platform independent apps that will run on a wide range of phones.

The idea is simple. All phones support a browser component, usually called webview or something similar, and you can host this in a native app. This means you can create a wrapper for an HTML 5/JavaScript app that allows it to run on almost any phone. All you have to do extra is provide some standard extension APIs that the wrapper exposed to the JavaScript to let it access the phone's system. 

You can think of the wrapper as a web browser with  the security sandbox thrown away.

This is Cordova and at the moment it seems to be the flavour of the month. For example, recently support for Firefox OS was added and you need to keep in mind that Firefox OS is an HTML/JavaScript operating system. Essentially this makes Cordova's the de facto API for the JavaScript web app.

The TechEd announcement enhances Cordova's position as the standard is reinforced. 

The Mutli-Device Hybrid App support allows you to build HTML/JavaScript apps that will run on all of the Cordova supported phones, but you get direct debugging of Android 4.4 and Windows Store apps. You can also test apps using the Apache Ripple simulator. Support for iOS isn't quite as good but this is Apple's fault for insisting that there is a Mac as part of the build system. You can make use of a remote agent running on a Mac from Visual Studio.

Why use Visual Studio with Cordova?

Microsoft lists the following advantages:

  • The ability to streamline multi-platform device development and improve efficiency through the use of existing tools

  • A great code editor

  • Advanced debugging tools

  • Testing capabilities for all platforms

  • Various open source front-end frameworks such as Angular, Bootstrap, Backbone, Underscore and WinJS

  • Integration with Microsoft services such as Azure Mobile services, Azure AD, Application Insights and Office 365

Multi-Device Hybrid Apps for Visual Studio CTP1 is ready to download now. 

 

Banner


CSS Ecosystem In the Spotlight
06/11/2024

The 2024 edition of the State of CSS has been posted, revealing that the latest features of the language not only do away with extra tooling, but even start taking on tasks that previously requir [ ... ]



Amazon Adds AWS Lambda Code Editing Tool
04/11/2024

Amazon has added a new code editing option for AWS Lambda in the AWS console based on the Code-OSS, Visual Studio Code Open Source code editor.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

Last Updated ( Wednesday, 14 May 2014 )