SlideShare une entreprise Scribd logo
1  sur  58
Windows Universal Apps 
Joe Healy :: @devfish :: jhealy@Microsoft.com 
Blogs.msdn.com/devfish
Universal – Getting Started 
• Download VS 2013 Update 3 or VS2014 previews 
• Make sure physical phone is at Windows Phone 8.1 or later 
• Make sure Windows is at 8.1 or later
Universal App Templates 
• Blank 
• Pretty straight forward 
• Hub 
• Similar to grid template in 
Windows 8 
• Displayed as pivot control in 
Windows Phone
File, New, Universal App 
DEMO
Universal Apps Project Layout 
Windows 8.1 XAML Project 
Windows Phone 8.1 XAML Project 
Shared Project linked back 
Into other projects 
Common reference items 
NOT pcode lib
Unified Windows Apps 
• Develop W8 and WP8 app with Universal Apps 
• Choose to let user download an app once, and get it on both platforms 
• Free or paid 
• New Unified Windows Apps symbol
Shared Project 
• Simplify sharing files across platform specific 
projects 
• Not meant to be compiled on their own 
• Not meant to be compiled directly to 
reference libraries 
• Allows you to include selected files into 
WP81 and Win81 projects separately, but in 
a single place 
• Some things just can’t go in a PCL, aka 
APP.XAML and #ifdef
Portable 
Class Libraries 
I compile just once 
and know it works 
on all platforms 
Shared 
Projects 
I can easily include 
platform-specific code 
under #if or partial 
classes
Debug Target 
• Dropdown menu to choose debug target 
• Switch between targeting Windows 8 and Windows Phone 
• Run both in emulators or on a device
Shared Project Context Switcher 
• Changes how screen is rendered 
• Changes what shows up in the device tab
Shared Project Context Switcher
Shared Project Context Switcher
Shared Project Context Switcher 
• ErrorChecks APIs for each platform
#ifdef directive 
• constants WINDOWS_APP and WINDOWS_PHONE_APP are 
conveniently predefined for you 
• Have platform specific code for each 
• If windows app, do this 
• If windows phone app, do this
#ifdef directive 
#if WINDOWS_APP 
if (!rootFrame.Navigate(typeof(HubPage))) 
#endif 
#if WINDOWS_PHONE_APP 
if 
(!rootFrame.Navigate(typeof(WindowsPhoneStartPage))) 
#endif 
{ 
throw new Exception("Failed to create initial page"); 
}
Classes Structs Interfaces 
Windows 8.1 SDK 566 119 59 
Windows Phone 8.1 SDK 624 131 57 
+58 +12 -2 
Windows.UI.Xaml.* 
* Via Tim Heuer’s analysis runs at BUILD 2014
Visual Studio streamlines developing universal 
Windows apps
You can tailor the design to each device
‘Primitives’ – Same Across Platforms 
• Layout: Panel, StackPanel, Grid, Border 
• Buttons, Slider, ToggleSwitch, CheckBox, RadioButton, 
ProgressBar 
• TextBox/TextBlock 
• Shapes/Path
‘Primitives’ – same API, tailored behavior 
Hub 
CommandBar 
Date/Time Pickers and List Pickers 
ListView 
Flyouts 
Media 
Ads SDK
Device-specific APIs 
Windows 
• AppBar 
• SearchBox 
• SettingsFlyout 
Windows Phone 
• Pivot 
• AutoSuggestBox 
• ContentDialog 
• Maps 
• System Chrome
converged controls 
what’s it really mean? 
80% exact same XAML 20% custom 
Common Optimized Signature 
DatePicker 
TimePicker 
CommandBar 
Button 
CheckBox 
ToggleSwitch 
Slider 
RadioButton ProgressBar 
Hub 
Pivot 
ListView 
GridView 
AppBar 
SysTray
Why Custom 
Windows Windows Phone
CommandBar 
<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>
CONTROLS PLAY 
DEMO
Navigation Model 
Navigation APIs Same 
Phone Hardware Back Button 
Windows in-app Back Button 
#if WINDOWS_PHONE_APP 
Windows.Phone.UI.Input.HardwareButtons.BackPressed += 
HardwareButtons_BackPressed; 
#endif
Approaches 
Native App 
( aka 8.0 ) 
SL 8.1 (WP) Windows Store API 
( aka Universal ) 
• Continues to work as is 
Add new funct and fixes 
• Reuse most code 
Add 8.1 features ( 
geofence, calendar, 
screen recording, WNS, 
others ) 
• Same app model and UI 
• Easy to support 
Not much work Repackage and republish Umm. To port? Just a little 
bit. Plus more. 
Runs on 8.0 and 8.1 WP 
Runs on 8.0 and 8.1 Win8 
WP 8.1 
Not all phones at 8.1 yet  
WP 8.1 
Win 8.1 
No future enhancements 
 
Controls, some older libs 
not there  
Win10 future?  Win10 Future?  Pathway to Win10
App Studio 
• File New Project for Universal Apps 
• Why not? 
• http://appstudio.windows.com
Controls 
• XAML and Phone Toolkit no worky here 
• Not much good stuff open source
App Studio 
DEMO
Telerik 
• Universal Controls in Beta - http://www.telerik.com/windows-universal- 
ui - release around Nov 1 – not sure of price
Telerik Controls 
• AutoComplete 
• BusyIndicator 
• Chart 
• Date Picker 
• Time Zpicker 
• Rating 
• DataBoundList
Telerik Beta 
DEMO
Sync Fusion 
• Sync Fusion - $1 for individual developer – 
http://www.syncfusion.com/sales/offers/winrt-hobbyist - $399 to 
companies 
• In release NOW
SyncFusion 
• Grid 
• DocIO / XlsIO / PDF 
• Busy Indicator 
• Hub Tile 
• Chart 
• Range Navigator 
• Guages 
• Maps 
• Treemap 
• Barcode 
• Sparkline 
• Calculate 
• TextBoxExt 
• ComboBox 
• DropDown 
• Date and Time Picker 
• Numeric Updown 
… lots more
SyncFusion
Sync Fusion 
DEMO
To Share or Not to Share 
• Question…How much of your UI code will be shared? 
• Options 
• Completely separate pages 
• Shared page with separate styles and templates 
• Shared page with shared styles and templates 
• Some other combination 
• Answer…whatever fits your app the best!
Shared Styles/Templates 
• How to share styles/templates 
• Add styles and templates to Shared Project 
• Share app.xaml 
• Reference styles and templates in ResourceDictionary
SHARED STYLE/TEMPLATES 
UNIVERSAL TIP
Storage
StorageFile and StorageFolder 
Most file content is managed with these types 
• Local files/folders 
• File activation 
• Media libraries 
• Share contract 
• Pickers 
Nearly all Windows Runtime APIs are supported
App Data Model 
IsolatedStorage 
Folder 
Roaming 
Folder Settings 
• Data roamed across 
Windows devices 
Local 
Folder Settings 
• Primary local store 
Temp 
Folder 
• Temporary storage 
• Cleaned up in low 
storage condition 
LocalCache 
Folder 
• Not backed up 
• Not cleaned up 
• Phone only
Accessing User Content 
User data exposed via KnownFolders 
• RemovableDevices (SD) 
• MusicLibrary 
• PicturesLibrary 
• VideosLibrary 
Direct access protected by capability 
All public files are available via pickers
Access Cache 
•Used to maintain access to shared files/folders 
• File activation 
• Share contract 
• File picker 
•Knowledge of file is maintained across deletes 
•If you need the file, make a copy
ROAMING
Roaming Local Temp 
Phone App – PFN 12345 
Temp Local Roaming 
Windows App – PFN 12345 
Roaming 
PFN 12345 
App writes data using 
standard file/settings APIs. 
Sync engine transfers data 
periodically based on 
triggers (user idle, battery, 
network, etc.) 
OneDrive stores up to 100kb of roaming data 
per app (not included in user quota). If app 
exceeds the limit, sync stops. 
Other clients are notified of 
updated data via WNS. If app 
is running when sync occurs, 
an event is raised. 
ROAMING 
Local 
Cache
Roaming Best Practices 
Use roaming for settings and small state 
Stick to core WinRT types 
Avoid dependencies across files/settings 
Be resilient against sync delays 
Use Windows.Security.Credentials for secure data
ROAMING 
DEMO
NUGET PACKAGES 
• Must be added to both Windows and 
Windows Phone projects if referenced in 
shared folder 
• “if your Windows Store app contained an 
assembly reference for a third-party library, 
and you move the associated code into the 
Shared folder, then you also have to reference 
the third-party library in the Windows Phone 
project”
Linked Apps 
• Share IAP and “Paid” status 
• Buy once, own everywhere 
• Shared roaming 
• Shared credential vault 
• Uses common Product Family Number (PFN) 
• Linking to WP8, WinRt possible
Linked Apps
Visual Studio 2014 – WinJS Universal Apps
Resources 
• dfWiki Universal Apps - 
http://dfwiki.devfish.net/technology.Universal-Apps.ashx 
• Developing Apps Using the Common XAML UI Framework - 
http://channel9.msdn.com/Events/Build/2014/2-507 
• What About XAML UI and Controls? Shawn Oster - 2-516 - 
http://channel9.msdn.com/Events/Build/2014/2-516 
• Using VS to Build XAML Converged Apps – Nivit Saxena - 
http://channel9.msdn.com/Events/Build/2014/3-591
Thanks 
• jhealy@Microsoft.com
Todo 
• Universal app samples out of windows 8.1 sdk

Contenu connexe

Tendances

Cross Platform, Native Mobile Application Development Using Xamarin and C#
Cross Platform, Native Mobile Application Development Using Xamarin and C#Cross Platform, Native Mobile Application Development Using Xamarin and C#
Cross Platform, Native Mobile Application Development Using Xamarin and C#
Shravan Kumar Kasagoni
 
Fast and fluid, Metro style application on Windows 8
Fast and fluid, Metro style application on Windows 8Fast and fluid, Metro style application on Windows 8
Fast and fluid, Metro style application on Windows 8
Supote Phunsakul
 
Automating functional testing of Flex applications.
Automating functional testing of Flex applications.Automating functional testing of Flex applications.
Automating functional testing of Flex applications.
Gokuldas Pillai
 

Tendances (16)

Docker for .net developer
Docker for .net developerDocker for .net developer
Docker for .net developer
 
The Art of Tizen UI Theme Technology in Various Profiles
The Art of Tizen UI Theme Technology in Various ProfilesThe Art of Tizen UI Theme Technology in Various Profiles
The Art of Tizen UI Theme Technology in Various Profiles
 
Mobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large ScaleMobile Cross Platform Automation in-practice and on a Large Scale
Mobile Cross Platform Automation in-practice and on a Large Scale
 
Ohoh
OhohOhoh
Ohoh
 
Wikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGapWikipedia Mobile App with PhoneGap
Wikipedia Mobile App with PhoneGap
 
Develop hololens
Develop hololensDevelop hololens
Develop hololens
 
A look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processingA look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processing
 
Universal windows platform - Application development done right
Universal windows platform - Application development done rightUniversal windows platform - Application development done right
Universal windows platform - Application development done right
 
Lessons Learned from a major IBM Collaboration Solutions Deployment
Lessons Learned from a major IBM Collaboration Solutions DeploymentLessons Learned from a major IBM Collaboration Solutions Deployment
Lessons Learned from a major IBM Collaboration Solutions Deployment
 
Wireless Wednesdays: Part 3
Wireless Wednesdays: Part 3Wireless Wednesdays: Part 3
Wireless Wednesdays: Part 3
 
Cross Platform, Native Mobile Application Development Using Xamarin and C#
Cross Platform, Native Mobile Application Development Using Xamarin and C#Cross Platform, Native Mobile Application Development Using Xamarin and C#
Cross Platform, Native Mobile Application Development Using Xamarin and C#
 
Fast and fluid, Metro style application on Windows 8
Fast and fluid, Metro style application on Windows 8Fast and fluid, Metro style application on Windows 8
Fast and fluid, Metro style application on Windows 8
 
Cross Platform Development in C# (DDDNorth 2013)
Cross Platform Development in C# (DDDNorth 2013)Cross Platform Development in C# (DDDNorth 2013)
Cross Platform Development in C# (DDDNorth 2013)
 
Introduction to UWP - Universal Windows Platform Application Development
Introduction to UWP - Universal Windows Platform Application DevelopmentIntroduction to UWP - Universal Windows Platform Application Development
Introduction to UWP - Universal Windows Platform Application Development
 
Automating functional testing of Flex applications.
Automating functional testing of Flex applications.Automating functional testing of Flex applications.
Automating functional testing of Flex applications.
 
Analyze Your Code With Visual Studio 2015 Diagnostic Tools
Analyze Your Code With Visual Studio 2015 Diagnostic ToolsAnalyze Your Code With Visual Studio 2015 Diagnostic Tools
Analyze Your Code With Visual Studio 2015 Diagnostic Tools
 

En vedette

En vedette (13)

More Monde CV
More Monde CVMore Monde CV
More Monde CV
 
Learn to use Ancestry.com/NY
Learn to use Ancestry.com/NYLearn to use Ancestry.com/NY
Learn to use Ancestry.com/NY
 
Kickstarter.com w liczbach - raport za sierpień 2014
Kickstarter.com w liczbach - raport za sierpień 2014Kickstarter.com w liczbach - raport za sierpień 2014
Kickstarter.com w liczbach - raport za sierpień 2014
 
Acalasia esofágica
Acalasia esofágicaAcalasia esofágica
Acalasia esofágica
 
Gamemaker - More core objects
Gamemaker - More core objectsGamemaker - More core objects
Gamemaker - More core objects
 
ConnectTheDots - My Galileo based weather station and first entry into IoT
ConnectTheDots - My Galileo based weather station and first entry into IoTConnectTheDots - My Galileo based weather station and first entry into IoT
ConnectTheDots - My Galileo based weather station and first entry into IoT
 
Gamemaker - A brief intro to gml and scripting
Gamemaker - A brief intro to gml and scriptingGamemaker - A brief intro to gml and scripting
Gamemaker - A brief intro to gml and scripting
 
50 سؤال فى مادة اللغة الانجليزية للصف الثالث الثانوى 2016 من وزارة التربية وا...
50 سؤال فى مادة اللغة الانجليزية للصف الثالث الثانوى 2016 من وزارة التربية وا...50 سؤال فى مادة اللغة الانجليزية للصف الثالث الثانوى 2016 من وزارة التربية وا...
50 سؤال فى مادة اللغة الانجليزية للصف الثالث الثانوى 2016 من وزارة التربية وا...
 
GameMaker - Publishing to Windows 8
GameMaker - Publishing to Windows 8GameMaker - Publishing to Windows 8
GameMaker - Publishing to Windows 8
 
Gamemaker - Intro and Core Objects
Gamemaker - Intro and Core ObjectsGamemaker - Intro and Core Objects
Gamemaker - Intro and Core Objects
 
مرشد المترجم للدكتور محمد عنانى
مرشد المترجم للدكتور محمد عنانىمرشد المترجم للدكتور محمد عنانى
مرشد المترجم للدكتور محمد عنانى
 
Step by step into TOEFL
Step by step into TOEFLStep by step into TOEFL
Step by step into TOEFL
 
The prisoner of zenda translated into Arabic قصة سجين زندا مترجمه للعربيه
The prisoner of zenda translated into Arabic قصة سجين زندا مترجمه للعربيهThe prisoner of zenda translated into Arabic قصة سجين زندا مترجمه للعربيه
The prisoner of zenda translated into Arabic قصة سجين زندا مترجمه للعربيه
 

Similaire à Universal Apps Oct 2014

Mob02 windows phone 8.1 app development
Mob02   windows phone 8.1 app development Mob02   windows phone 8.1 app development
Mob02 windows phone 8.1 app development
DotNetCampus
 
Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1
drudolph11
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Oliver Scheer
 

Similaire à Universal Apps Oct 2014 (20)

Windows Universal Apps
Windows Universal AppsWindows Universal Apps
Windows Universal Apps
 
Windows Phone 8 App Development
Windows Phone 8 App DevelopmentWindows Phone 8 App Development
Windows Phone 8 App Development
 
Introducing the Windows Phone 8.1 App Development Platform
Introducing the Windows Phone 8.1 App Development PlatformIntroducing the Windows Phone 8.1 App Development Platform
Introducing the Windows Phone 8.1 App Development Platform
 
Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Building Universal Windows Apps for Smartphones and Tablets with XAML & C#Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
Building Universal Windows Apps for Smartphones and Tablets with XAML & C#
 
01 introducing the windows phone 8.1
01   introducing the windows phone 8.101   introducing the windows phone 8.1
01 introducing the windows phone 8.1
 
Windows Phone Introduction
Windows Phone IntroductionWindows Phone Introduction
Windows Phone Introduction
 
Mob02 windows phone 8.1 app development
Mob02   windows phone 8.1 app development Mob02   windows phone 8.1 app development
Mob02 windows phone 8.1 app development
 
Android Workshop Part 1
Android Workshop Part 1Android Workshop Part 1
Android Workshop Part 1
 
Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA
 
Developing Apps for Windows Phone 8
Developing Apps for Windows Phone 8Developing Apps for Windows Phone 8
Developing Apps for Windows Phone 8
 
Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1
 
How to modernise WPF and Windows Forms applications with Windows Apps SDK
How to modernise WPF and Windows Forms applications with Windows Apps SDKHow to modernise WPF and Windows Forms applications with Windows Apps SDK
How to modernise WPF and Windows Forms applications with Windows Apps SDK
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Universal Apps for Windows
Universal Apps for WindowsUniversal Apps for Windows
Universal Apps for Windows
 
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 DevelopmentWindows Phone 8 - 1 Introducing Windows Phone 8 Development
Windows Phone 8 - 1 Introducing Windows Phone 8 Development
 
Windows Phone 8 - introducing wp8 development
Windows Phone 8 - introducing wp8 developmentWindows Phone 8 - introducing wp8 development
Windows Phone 8 - introducing wp8 development
 
An Introduction to Universal Windows Apps
An Introduction to Universal Windows AppsAn Introduction to Universal Windows Apps
An Introduction to Universal Windows Apps
 
Android
AndroidAndroid
Android
 
Mobile Application Development powerpoint
Mobile Application Development powerpointMobile Application Development powerpoint
Mobile Application Development powerpoint
 
Android ppt
Android ppt Android ppt
Android ppt
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Universal Apps Oct 2014

  • 1. Windows Universal Apps Joe Healy :: @devfish :: jhealy@Microsoft.com Blogs.msdn.com/devfish
  • 2. Universal – Getting Started • Download VS 2013 Update 3 or VS2014 previews • Make sure physical phone is at Windows Phone 8.1 or later • Make sure Windows is at 8.1 or later
  • 3. Universal App Templates • Blank • Pretty straight forward • Hub • Similar to grid template in Windows 8 • Displayed as pivot control in Windows Phone
  • 5. Universal Apps Project Layout Windows 8.1 XAML Project Windows Phone 8.1 XAML Project Shared Project linked back Into other projects Common reference items NOT pcode lib
  • 6. Unified Windows Apps • Develop W8 and WP8 app with Universal Apps • Choose to let user download an app once, and get it on both platforms • Free or paid • New Unified Windows Apps symbol
  • 7. Shared Project • Simplify sharing files across platform specific projects • Not meant to be compiled on their own • Not meant to be compiled directly to reference libraries • Allows you to include selected files into WP81 and Win81 projects separately, but in a single place • Some things just can’t go in a PCL, aka APP.XAML and #ifdef
  • 8. Portable Class Libraries I compile just once and know it works on all platforms Shared Projects I can easily include platform-specific code under #if or partial classes
  • 9. Debug Target • Dropdown menu to choose debug target • Switch between targeting Windows 8 and Windows Phone • Run both in emulators or on a device
  • 10. Shared Project Context Switcher • Changes how screen is rendered • Changes what shows up in the device tab
  • 13. Shared Project Context Switcher • ErrorChecks APIs for each platform
  • 14. #ifdef directive • constants WINDOWS_APP and WINDOWS_PHONE_APP are conveniently predefined for you • Have platform specific code for each • If windows app, do this • If windows phone app, do this
  • 15. #ifdef directive #if WINDOWS_APP if (!rootFrame.Navigate(typeof(HubPage))) #endif #if WINDOWS_PHONE_APP if (!rootFrame.Navigate(typeof(WindowsPhoneStartPage))) #endif { throw new Exception("Failed to create initial page"); }
  • 16. Classes Structs Interfaces Windows 8.1 SDK 566 119 59 Windows Phone 8.1 SDK 624 131 57 +58 +12 -2 Windows.UI.Xaml.* * Via Tim Heuer’s analysis runs at BUILD 2014
  • 17. Visual Studio streamlines developing universal Windows apps
  • 18. You can tailor the design to each device
  • 19. ‘Primitives’ – Same Across Platforms • Layout: Panel, StackPanel, Grid, Border • Buttons, Slider, ToggleSwitch, CheckBox, RadioButton, ProgressBar • TextBox/TextBlock • Shapes/Path
  • 20. ‘Primitives’ – same API, tailored behavior Hub CommandBar Date/Time Pickers and List Pickers ListView Flyouts Media Ads SDK
  • 21. Device-specific APIs Windows • AppBar • SearchBox • SettingsFlyout Windows Phone • Pivot • AutoSuggestBox • ContentDialog • Maps • System Chrome
  • 22. converged controls what’s it really mean? 80% exact same XAML 20% custom Common Optimized Signature DatePicker TimePicker CommandBar Button CheckBox ToggleSwitch Slider RadioButton ProgressBar Hub Pivot ListView GridView AppBar SysTray
  • 23.
  • 24. Why Custom Windows Windows Phone
  • 25. CommandBar <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>
  • 26.
  • 28. Navigation Model Navigation APIs Same Phone Hardware Back Button Windows in-app Back Button #if WINDOWS_PHONE_APP Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed; #endif
  • 29. Approaches Native App ( aka 8.0 ) SL 8.1 (WP) Windows Store API ( aka Universal ) • Continues to work as is Add new funct and fixes • Reuse most code Add 8.1 features ( geofence, calendar, screen recording, WNS, others ) • Same app model and UI • Easy to support Not much work Repackage and republish Umm. To port? Just a little bit. Plus more. Runs on 8.0 and 8.1 WP Runs on 8.0 and 8.1 Win8 WP 8.1 Not all phones at 8.1 yet  WP 8.1 Win 8.1 No future enhancements  Controls, some older libs not there  Win10 future?  Win10 Future?  Pathway to Win10
  • 30. App Studio • File New Project for Universal Apps • Why not? • http://appstudio.windows.com
  • 31. Controls • XAML and Phone Toolkit no worky here • Not much good stuff open source
  • 33. Telerik • Universal Controls in Beta - http://www.telerik.com/windows-universal- ui - release around Nov 1 – not sure of price
  • 34. Telerik Controls • AutoComplete • BusyIndicator • Chart • Date Picker • Time Zpicker • Rating • DataBoundList
  • 36. Sync Fusion • Sync Fusion - $1 for individual developer – http://www.syncfusion.com/sales/offers/winrt-hobbyist - $399 to companies • In release NOW
  • 37. SyncFusion • Grid • DocIO / XlsIO / PDF • Busy Indicator • Hub Tile • Chart • Range Navigator • Guages • Maps • Treemap • Barcode • Sparkline • Calculate • TextBoxExt • ComboBox • DropDown • Date and Time Picker • Numeric Updown … lots more
  • 40. To Share or Not to Share • Question…How much of your UI code will be shared? • Options • Completely separate pages • Shared page with separate styles and templates • Shared page with shared styles and templates • Some other combination • Answer…whatever fits your app the best!
  • 41. Shared Styles/Templates • How to share styles/templates • Add styles and templates to Shared Project • Share app.xaml • Reference styles and templates in ResourceDictionary
  • 44. StorageFile and StorageFolder Most file content is managed with these types • Local files/folders • File activation • Media libraries • Share contract • Pickers Nearly all Windows Runtime APIs are supported
  • 45. App Data Model IsolatedStorage Folder Roaming Folder Settings • Data roamed across Windows devices Local Folder Settings • Primary local store Temp Folder • Temporary storage • Cleaned up in low storage condition LocalCache Folder • Not backed up • Not cleaned up • Phone only
  • 46. Accessing User Content User data exposed via KnownFolders • RemovableDevices (SD) • MusicLibrary • PicturesLibrary • VideosLibrary Direct access protected by capability All public files are available via pickers
  • 47. Access Cache •Used to maintain access to shared files/folders • File activation • Share contract • File picker •Knowledge of file is maintained across deletes •If you need the file, make a copy
  • 49. Roaming Local Temp Phone App – PFN 12345 Temp Local Roaming Windows App – PFN 12345 Roaming PFN 12345 App writes data using standard file/settings APIs. Sync engine transfers data periodically based on triggers (user idle, battery, network, etc.) OneDrive stores up to 100kb of roaming data per app (not included in user quota). If app exceeds the limit, sync stops. Other clients are notified of updated data via WNS. If app is running when sync occurs, an event is raised. ROAMING Local Cache
  • 50. Roaming Best Practices Use roaming for settings and small state Stick to core WinRT types Avoid dependencies across files/settings Be resilient against sync delays Use Windows.Security.Credentials for secure data
  • 52. NUGET PACKAGES • Must be added to both Windows and Windows Phone projects if referenced in shared folder • “if your Windows Store app contained an assembly reference for a third-party library, and you move the associated code into the Shared folder, then you also have to reference the third-party library in the Windows Phone project”
  • 53. Linked Apps • Share IAP and “Paid” status • Buy once, own everywhere • Shared roaming • Shared credential vault • Uses common Product Family Number (PFN) • Linking to WP8, WinRt possible
  • 55. Visual Studio 2014 – WinJS Universal Apps
  • 56. Resources • dfWiki Universal Apps - http://dfwiki.devfish.net/technology.Universal-Apps.ashx • Developing Apps Using the Common XAML UI Framework - http://channel9.msdn.com/Events/Build/2014/2-507 • What About XAML UI and Controls? Shawn Oster - 2-516 - http://channel9.msdn.com/Events/Build/2014/2-516 • Using VS to Build XAML Converged Apps – Nivit Saxena - http://channel9.msdn.com/Events/Build/2014/3-591
  • 58. Todo • Universal app samples out of windows 8.1 sdk

Notes de l'éditeur

  1. Update 2- http://visualstudiomagazine.com/articles/2014/05/12/microsoft-releases-vs--2013-update-2.aspx
  2. Build a simple new Universal App. Put in some hello, world text. Show project structure and outputs.
  3. C:\presentations\universalapps\demo01
  4. DEMO