An Introduction to Universal Windows Apps
-
Upload
ken-cenerelli -
Category
Technology
-
view
207 -
download
1
Transcript of An Introduction to Universal Windows Apps
An Introduction to
Universal Windows Apps
Ken Cenerelli
@KenCenerelli
What is it?
Build one app that targets Windows and Windows Phone
Provides a common experience, shared app identity, single app
purchase, shared in-app purchases and shared data/profile
It is not:
A single binary
A non-Windows application (i.e. Supporting Android & iOS)
A non-native HTML/JavaScript application (i.e. Apache Cordova)
Overview
Announced in April 2014
Develop once for all Windows devices using a unified
Windows runtime and set of tools
Project structure comes from Linked Files, a technology since
the early days of .NET 2005
Platform Convergence
Windows Phone 8.1, Windows 8 RT and Window 8.1 flavours of
Windows share a common runtime
Existing Windows 8 apps can be migrated to shared projects
Share code while just making tweaks to the UI
Silverlight Phone 8.0 apps work on 8.1 without upgrade
The Windows Runtime API & Microsoft SDKs are
around 90% converged and closing
Why should you care?
Windows 10 is coming with a free upgrade for Windows 8 so
exponentially more adoption within the enterprise
Source: OS Platform Statistics, http://www.w3schools.com/browsers/browsers_os.asp
Flip side though is Windows Phone market share is 2.9%
compared to ~84% for Android and ~12% for iOSSource: Smartphone OS Market Share, Q3 2014, http://www.idc.com/prodserv/smartphone-os-market-share.jsp
Things to know
Multiple languages supported (C# or C++ with XAML,
C++ with DirectX, and JavaScript with HTML/CSS)
The IDE is free
Must be Visual Studio 2013 with Update 2 or later
Works with the Express versions and the new Community Edition
Physical device nice to have but not essential
Requires a developer license for your computer
Needs a Microsoft account (i.e. Windows Live account)
Requires a developer account to publish ($20 CAD)
Demo
Our first Universal Windows App
How to share code? Before UA there were:
Linked Files
Portable Class Libraries
We now have:
Shared Projects (Conditional Compilation)
Partial Classes (Split the code across multiple files)
Portable Class Libraries
Base Classes
User Controls
Visibility
Things to share
Reusable business logic (C# code)
Resources & Assets (images)
Views similar to both projects:
Login Page
Privacy Page
Demo
Sharing code and views:
Shared Projects
Conditional Compilation
Partial Classes
XAML UI code
Rules of Thumb Conditional Compilation
Can make code difficult to read
Solves small, quick-hit platform problems
Only supported when using the Shared project
Partial classes
Makes it easy to isolate platform code
Difficult to see the entirety of your code
Don’t expect to save time writing XAML
Do expect to save time writing implementation code
Tips for design Think through the design for both platforms before you
start coding
If you keep the Microsoft design, it means that the user knows how to move around the app intuitively
Device variability: Default for tablet Is landscape and default for phone is portrait
It’s okay if each version doesn’t look the same and doesn’t have the same features
There is no silver bullet solution
There are just small choices you will make as you develop a pattern of practice
Tips for development
Develop apps in sync to solve problems in parallel
Target lowest supported device for phone development
~50% of Windows Phone users use a low-end device
Startup both projects in the emulator at the same time
Use the Navigation Bar to segment your code per project
Optimize the user experience for the device they are on
Testing
Unit Tests
Create separate unit test projects for each platform
Coded UI
Need Visual Studio Premium and Ultimate
Windows App Certification Kit (WACK)
Available as separate download
Windows Store app test cases
Publishing
Reserve a name in the store for your app
Valid for 12 months
Must match the Display Name in your app manifest
If the app connects to internet, must have a Privacy Policy
Publish first app and then associate the second to it
Approval takes anywhere from 0.5 days to a week
Resources
Get started with Universal Windows Apps:
http://bit.ly/1L45n62
http://bit.ly/1MrKx3Q
http://bit.ly/1u033XM
Summary
Please fill out your surveys!
Title: An Introduction to Universal Windows Apps
https://joind.in/talk/view/13288
Contact Details:
@KenCenerelli
kencenerelli.wordpress.com/contact