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


Google Opensources Privacy Library
08/11/2024

Google is making a new differential privacy library available as open source. PipelineDP4J is a Java-based library that can be used to analyse data sets while preserving privacy.



Gender Differences In Coding Style
13/11/2024

A novel investigation into the gender gap between men and women regarding coding ability was undertaken by Dr Siân Brooke. Her conclusion? There is a difference in the Python code [ ... ]


More News

 

espbook

 

Comments




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

 

Last Updated ( Wednesday, 14 May 2014 )