Jesse MacFadyen aka @purplecabbage
Windows is an operating system.
Windows runs on computers collectively called 'PCs'
I make fun of this, because Mac seems to be over-represented in the tech community these days. IMHO
The first non-WebKit PhoneGap supported device
IE9
Apache Cordova full API support, minus a few exceptions ...
Cordova for WP8 was mostly implemented by Sergey and Ruslan
Microsoft supported development with access to devices, SDKs and technical expertise
Landing in 2.3.0 next week ( Mid December 2012 ), blog posts coming soon.
Apache Cordova full API support, minus a few exceptions ...
// Non-strict code...
(function(){
"use strict";
// Define your library strictly...
})();
// Non-strict code...
Microsoft actually documents how to communicate between JS + C#
The template has issues
Windows Phone 8 devices run WP7 apps.
I actually recommend that developers stick to Cordova for Windows Phone 7 for now.
Windows Phone 7 + 8 both use static analysis.
There is also a permission manifest file.
This determines what permissions to list on your app store page
ie Why does this Todo-list app require access to my contacts, or camera, or my identity?
Cordova for Windows Phone 7 + 8 gets around this in a couple of ways :
Formerly known as 'Metro'
extensive use of the Promise API from common JS
http://msdn.microsoft.com/en-us/library/windows/apps/br211867(v=VS.85).aspx
aAsync()
.then(function () { return bAsync(); })
.then(function () { return cAsync(); })
.done(function () { finish(); });
// Assign the URI to download from.
var uriExample = new Windows.Foundation.Uri("http://www.microsoft.com");
// Get the folder for temporary files.
var tempFolder = Windows.Storage.ApplicationData.current.temporaryFolder;
// Create the temp file asynchronously.
tempFolder.createFileAsync("tempfile.txt").then(
function (tempFile) {
// The createFileAsync call succeeded, so start the download operation.
var downloader = new Windows.Networking.BackgroundTransfer.BackgroundDownloader();
var transfer = downloader.createDownload(uriExample, tempFile);
return transfer.startAsync();
}).then(function (result) {
//Define the function to use when the download completes successfully
console.log("File download complete.");
},
// Define the error handling function.
function (error) {
console.log("File download failed.");
},
// Define the progress handling function.
function (result) {
console.log("Bytes retrieved: " + result.progress.bytesReceived);
});
Developers are being strongly encouraged by Microsoft
Windows 8 uses a permission manifest to specify your permissions. This manifest determines what device APIs the browser exposes at runtime. Static analysis is not required.
Our current nodejs based builder for cordova-js needs to take this into account ( open issue in JIRA https://issues.apache.org/jira/browse/CB-2050 )
... or is it?