Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
-
Upload
nick-landry -
Category
Technology
-
view
4.815 -
download
2
description
Transcript of Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
[email protected]@ActiveNick
http://www.bigbaldapps.com
www.AgeofMobility.com
@ActiveNick 2005-2014
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
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
| |
A converged developer platform enables you to do more with the same code and skillset
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
Visual Studio streamlines developing universal Windows apps
You can tailor the design to each device
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
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
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!
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)
Keep using Windows Phone Silverlight 8.0 / 8.1 for these features / apps
80% exact same XAML 20% custom
Common SignatureOptimized
DatePicker
TimePicker
CommandBar
Button
CheckBox
RadioButton ProgressBar
Slider
ToggleSwitchHub
Pivot
ListView
GridView
AppBar
SysTray
Windows Windows Phone
<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>
#if WINDOWS_PHONE_APPWindows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
#endif
2560 x 1440
1920 x 1080
1366 x 768450 x 800
to scale
Scale Factors and Effective Resolution
384 x 683
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
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
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
720p
Manifest(s)
1080p SpanishGermanItalianFrenchEnglishWVGA
DLLs
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
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
http://channel9.msdn.com/Events/Build/2014/
http://channel9.msdn.com/Events/Build/2014
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
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
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]