Windows 8 for the iOS Developer
Greetings from the Microsoft Build conference in Seattle!
We’re here now as our very own Aaron Hillegass has just finished giving his talk about Windows 8 and the opportunities it presents to iOS developers. You’ll find a recording of his talk on channel9 once its posted.
You may be wondering what Big Nerd Ranch is doing at the heart of Microsoft of all places, given our Apple roots. The truth is that Windows 8 is a pretty compelling technology. Our enterprise customers have been asking about Windows 8 apps for a while now, so we figured we would give it a look. What we found is a solid technology that’s making some bold moves in user interface. In stride with Aaron’s talk, we wanted to share some of the things we’ve observed and learned about Windows 8, from a very iOS perspective.
Design Differences
One of the first things you’ll notice about Windows 8, even just as a user, is its aggressive design. Love it or hate it, it is certainly radically different than anything we’ve seen before.
The spirit of the UI is very much to focus on the content, and not chrome. You won’t find any skeuomorphism here. Microsoft describes the experience as “Authentically Digital”, and you’d be hard pressed to disagree. Drop shadows, rounded corners, gradients, and other design choices that we’ve been doing for so long are all thrown out the window. Flat application icons, large text, and lots of information are in. New ways of navigating content such as Semantic Zoom and the FlipView (paging sans the page flipping animation of course) are all tenets of this authentically digital design language. New View States, like snapped and filled, go beyond just portrait and landscape orientations and are all about getting more content to the user.
Of course, there are some similarities between the two design philosophies, in that all interactions should be fast and fluid, and that user interactions should be consistent not only within an app, but within the whole ecosystem.
Additional Capabilities
With the content-first design guidelines in mind, Windows 8 adds some capabilities to the mobile scene that are rather neat.
Rather than just an application icon with numeric badges, Windows 8 takes it a step further by bringing the icon to life, almost literally, with Live Tiles. These tiles can cycle through a queue of notifications, with each notification having its own set of rich content, images and/or text.
Additionally, Windows 8 allows for applications to interact with other applications and to easily share content between them, but the OS keeps a tight leash on these interactions by way of the Sharing Contract. The Sharing Contract allows for an application to register itself as a content source for a certain type of file. If your app is a photo album for example, you would register as a provider of photos, and the user will be able to choose photos for your app from a completely different application. In addition to sharing content between apps, contracts are also used by the application to request privileges for certain non-trivial functionality from the OS for functions such as the Camera, choosing files, even printing!
Tools and Language(s)
In order to take advantage of all these cool new features, and to try your hand at some authentically digital design, you’ll need to get set up with the right tools.
When developing for iOS, your tools are Xcode for the code, and Interface Builder for the Interface. Without a device, you run your code on the simulator, or deploy to a device in order to test some of the things the simulator just can’t do. You also need your developer account.
The story is basically the same for Windows 8. You’ll need Visual Studio for the code, and Blend for the Interface. You get a simulator as well (for things like touch and stylus input). Additionally, you get to deploy locally as well, and debug on the same hardware that you develop on (which may or may not have touch). Just like developing for iOS, these tools are a breeze to install and setup, and you can get going almost right away (unlike that other mobile platform…), but you’ll need to pay the toll to get into the store.
Unlike iOS, however, you’ll find that you have a bevy of language and layout options that all get first class native API support, as you can see below where a file is being created asynchronously using the new WinRT APIs. If you are starting fresh, C# and XAML (Extensible Application Markup Language) is likely the best candidate for your everyday app, but javascript and HTML 5 are also first class API citizens. C++ and XAML is yet another option, and of course it just wouldn’t be Windows without support for Visual Basic as well! And if you are feeling particularly masochistic, you could even develop an app that uses all of these technologies, and work in some straight C code while you are at it too!
To help out in the transition, Microsoft has released an API mapping tool, that you may want to keep handy: http://aka.ms/iosmap
Code in JavaScript:
Windows.Storage.KnownFolders.documentsLibrary.createFileAsync("sample.dat", Windows.Storage.CreationCollisionOption.replaceExisting).done(
function (file) {
SdkSample.sampleFile = file;
var outputDiv = document.getElementById("output");
},
function (error) {
WinJS.log && WinJS.log(error, "sample", "error");
});
Code in C#:
rootPage.sampleFile = await storageFolder.CreateFileAsync(MainPage.filename, CreationCollisionOption.ReplaceExisting);
Code in C++:
create_task(KnownFolders::DocumentsLibrary->CreateFileAsync(rootPage->Filename, CreationCollisionOption::ReplaceExisting)).then([this](StorageFile^ file)
{
rootPage->SampleFile = file;
});
Code in VB:
rootPage.sampleFile = Await storageFolder.CreateFileAsync(MainPage.filename, CreationCollisionOption.ReplaceExisting)
Marketplace Differences
Trials! Yes, the Windows Store allows for trials, both time-limited and featured-limited! To us, the time-based trials are kind of a big deal. Now you, the app developer, can feel comfortable pricing your application at its true value knowing that your users will be able to fully evaluate the merits of your software without the fear of buyer’s remorse. It’s also worth mentioning that the 7-day trial feature can be set up without writing a single line of code, it’s all configured in the windows Store portal (of course, the feature-based trials will require some work though).
Just like the App Store on iOS, the Windows Store provides its own ecommerce for in-app purchasing, and they also take the standard cut of 30% of all app sales and in app purchases. Unlike the App Store though, you are free to use any other in-app purchasing or commerce system that you please, and Microsoft won’t be getting a cut. Additionally once your app hits it big and makes at least $25k, Microsoft’s cut goes down to only 20%. Not Bad.
Also of note is the Windows Store pricing: $1.49 is the minimum, perhaps aiming to curb the race to the bottom that goes on in other mobile marketplaces.
This isn’t your first rodeo…
We think this Windows 8 thing is worth a look, and believe that existing mobile developers have a substantial advantage. You already have assets, web services, high quality images, a well thought out application flow, and a knack for a delightful user experience; things that are harder to learn than a new language! Try it out, you’ll likely find yourself rather comfortable with the new Windows 8 APIs and the functionality they expose.
…but there is still a lot to learn
We’ve barely scratched the surface of Windows 8 in this measly post, as the APIs are expansive and featured packed, as are the languages, but we think this all new Windows could be really be worth a look. We’ll be living and breathing Windows 8 here at the Ranch for the next couple of months as we prepare our course on developing Windows Store Apps using C# and XAML. The course will be ready for primetime come early next year, so if you find yourself needing some help, you know where to find us!
We’ll also be presenting at a special event in December that’s being hosted in Silicon Valley to help iOS developer get started with Windows Store Applications. Register here: http://aka.ms/iostowindowscamp, and if you can’t make it out, not to worry, the event will be live streamed worldwide!