building universal windows apps for smartphones and tablets with xaml & c#

of 47 /47
[email protected] www.AgeofMobility.com @ActiveNick

Author: nick-landry

Post on 14-Jan-2015

4.811 views

Category:

Technology


2 download

Embed Size (px)

DESCRIPTION

This session is your fast track into the wonderful new world of app development for Windows device. Come learn how your valuable C# skills now make you a hot mobile developer for smartphones, tablets, laptops and desktops. We’ll perform a quick lap around Microsoft Visual Studio 2013 and the new Windows Universal Apps, build our first app using XAML & C#, and debug it with Windows 8.1 and the Windows Phone Emulator. We’ll then explore the converged WinRT API services and features, such as touch input, accelerometers, Live Tiles, etc. We’ll also spend valuable time going over the new app model for Windows device apps, how to share code between phone and tablet, and how to build a converged UI in XAML for Windows 8.1 and Windows Phone. Lastly we’ll go over the app packaging and how to submit your Universal apps to the Windows Store. The converged Windows Platform is more efficient and far-reaching than ever. Come learn how to build mobile apps for hundreds of millions of Windows device users.

TRANSCRIPT

Page 1: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

[email protected]@ActiveNick

Page 2: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

http://www.bigbaldapps.com

www.AgeofMobility.com

@ActiveNick 2005-2014

Page 3: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 4: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Windows brings apps to lifeWindows provides apps with more ways to engage users,

both on device and across all of their Windows screens

Design once to engage everywhereDevelopers can use universal Windows apps to design an

one app that can target every Windows screen

Build faster with Visual StudioNew shared projects for Universal Windows apps allow

developers to share as much or as little between Windows

and Windows Phone projects

Page 5: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Converged web browser

• WP 7.5 shipped with IE9

• Same rendering + JavaScript engine

Aligned user experience

• Modern UI on WP + Xbox 360

Aligned dev platform

• Games: DirectX; XNA

• Apps: XAML + XAML (WPF; SL)

Converged core (NT kernel)

• Common kernel & file system

• Converged driver model

• Converged networking stack

• Secure boot & storage encryption

(BitLocker)

Aligning user experience

• Live tiles on Windows

Aligning the dev platform

• Aligned UI frameworks:

XAML; DirectX; C++

• Converged API for sensors & IAP

• Converged Web Browser: IE10

Converged dev platform

• Converged WinRT app model

on Windows, Windows Phone, Xbox

• Converged roaming + credentials

• Better HTML5/web support via IE

Aligning the Stores

Aligned processes and policies

Shared dev registration

• Shared entitlement

Improved App Experience

• Proximity & location frameworks

• Security & identity

• Background execution

Page 6: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

| |

A converged developer platform enables you to do more with the same code and skillset

Page 7: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Universal Windows apps

• One Visual Studio solution with three nodes

• Two UI node (One for phone; one for client)

• One shared code node (WinRT apps only)

Linked appsDevs can be link their Store apps using a common

PFN (Product Family Number) across client + phone

New tooling and app linking makes it easy to engage everywhere

Page 8: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Visual Studio streamlines developing universal Windows apps

Page 9: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

You can tailor the design to each device

Page 10: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 11: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Shared projects to build universal apps• One shared project solution in Visual Studio

• Project creates two AppX packages (one per Store)

• Shared dev and test tooling for both platforms

IDE improvements

Page 12: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

C#

#if WINDOWS_PHONE_APP

Windows.Phone.UI.Input.HardwareButtons.BackPressed += this.HardwareButtons_BackPressed;

#endif

C++

#if WINAPI_FAMILY==WINAPI_FAMILY_PHONE_APP

_backPressedEventToken = HardwareButtons::BackPressed +=

ref new EventHandler<BackPressedEventArgs^>(this,

&NavigationHelper::HardwareButton_BackPressed);

#endif

Page 13: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 14: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 15: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

PortableClass Libraries

I compile just onceand know it works

on all platforms

SharedProjects

I can easily include platform-specific code under #if or partial classes

New! Improved!

Page 16: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Windows Runtime (WinRT) is the shared runtime and API space used acrossthe Windows platform (phone + client)

API coverage for Store app scenarios

• In 8.0, we had ~30% API convergence

In 8.1, we move well past 90%+ convergence

Common contract support now converged:Launch; Share; CachedFileUpdater; FilePicker

Most non-converged APIs are form-factor specific(SMS/phone calls; Direct Access)

Page 17: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Keep using Windows Phone Silverlight 8.0 / 8.1 for these features / apps

Page 18: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 19: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 20: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

80% exact same XAML 20% custom

Common SignatureOptimized

DatePicker

TimePicker

CommandBar

Button

CheckBox

RadioButton ProgressBar

Slider

ToggleSwitchHub

Pivot

ListView

GridView

AppBar

SysTray

Page 21: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Windows Windows Phone

Page 22: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 23: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 24: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 25: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 26: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

<Page.BottomAppBar>

<CommandBar>

<AppBarButton Icon="Accept" Label="Accept" />

<AppBarButton Icon="Cancel" Label="Cancel" />

<CommandBar.SecondaryCommands>

<AppBarButton x:Uid="AboutAppBarButton" Icon="Help" />

<AppBarButton x:Uid="HomeAppBarButton" Icon="Home" />

</CommandBar.SecondaryCommands>

</CommandBar>

</Page.BottomAppBar>

Page 27: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 28: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 29: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

#if WINDOWS_PHONE_APPWindows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;

#endif

Page 30: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 31: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 32: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

2560 x 1440

1920 x 1080

1366 x 768450 x 800

to scale

Scale Factors and Effective Resolution

384 x 683

Page 33: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Provides a common layout coordinate system that extends along the x and y axis into infinity, allowing you to scale up

Physical screen size determines how much of this canvas is available

Works for all screen sizes across the entire Windows platform

10”

tablet

7” tablet

6”

5”

4.5”

Infinite virtual canvas

166 Logical DPI

Windows uses a virtual layout canvas to enable your app to light-up the experience most appropriate to the screen

Page 34: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Converged background task model• Improved background agents make your app more agile

• New triggers and conditions increase user engagement

Background agent improvements

New trigger-based execution options

Page 35: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 36: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

A single place for all your missed notifications FIFO processing

Limit of 20 notifications per app

Retained only for 7 days

Notification management

The Action Center provides fresh and relevant information while preserving glance + go

Page 37: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 38: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Page 39: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

720p

Manifest(s)

1080p SpanishGermanItalianFrenchEnglishWVGA

DLLs

Page 40: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Start screen backup

Configuration data can roam with the user

• Sync engine transfers data periodically based on triggers(user idle, battery, network, etc.)

• Syncs up to 100kb of data using the app’s PFN

• Data is stored in the user’s OneDrive account,

but doesn’t count against their OneDrive quota

Application data can be backed upData is backed up daily in user’s SkyDrive account per device, and counts

against their OneDive quota

(user can disable)

Roaming Local Temp

Credential Locker

Roaming Local Temp

Roaming

100kb

100kb

Device ADevice B

Page 41: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Proven Productivity Shared project tooling

Windows Azure Mobile Services

Notifications Hubs

Power tools

Profiling tools

Store Test Kit

Support for the full app lifecycle

Visual Studio Online

Page 42: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

http://channel9.msdn.com/Events/Build/2014/

Page 43: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

http://channel9.msdn.com/Events/Build/2014

Page 44: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Get Ready to Become a Windows Phone Developerdev.windowsphone.com

Learn More About Windows Phone Dev via Official Microsoft Videoshttp://aka.ms/wp81js

http://aka.ms/wp81devbegin

Check Out Additional Learning Resourceswww.pluralsight.com/training/Courses#windows-phone

www.developer.nokia.com

Download Additional Resources & Become an Expertphone.codeplex.com

http://bit.ly/nokiadevoffers

50

1

2

3

4

Page 45: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

www.AgeofMobility.com

dev.windowsphone.com

dev.windows.com

blogs.windows.com/windows_phone/b/wpdev

blogs.windows.com/windows_phone/b/windowsphone

http://developer.nokia.com

http://bit.ly/godvlup

http://conversations.nokia.com

http://appstudio.windows.com

http://flip.it/95YFG

www.geekchamp.com

www.wpcentral.com

Page 46: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#

Thank You!

Slides will be posted on my Slideshare account.

Slideshare: www.slideshare.net/ActiveNick

Blog: www.AgeofMobility.com

Twitter: @ActiveNick

Mobile Apps: www.bigbaldapps.com

LinkedIn: www.linkedin.com/in/activenick

Website: www.AgeofMobility.com

Email: [email protected]

Page 47: Building Universal Windows Apps for Smartphones and Tablets with XAML & C#