SlideShare une entreprise Scribd logo
1  sur  48
Building a Modern Windows App 
Brent Edwards 
Principal Lead Consultant 
BrentE@magenic.com 
@brentledwards 
brentedwards.net 
https://github.com/brentedwards
November 17-21 
Royal Pacific Resort at Universal 
Orlando, FL 
More info: http://modernappslive.com 
Register and save money: http://bit.ly/LSPK27REG
What We Will Cover 
• MVVM 
• Universal Apps 
• Dealing with Code Differences 
• Navigation 
• Application Settings 
• Secondary Tiles 
• Contracts 
• Unit Testing
Charmed Framework
Charmed Framework 
• Open source, Windows-based MVVM support library 
– Windows 8.1 
– Windows Phone 8.1 
– Updated to Universal Apps 
• https://github.com/brentedwards/Charmed
Charmed Reader 
[Demo]
MVVM 
Model-View-ViewModel
Model-View-ViewModel
Why is MVVM Cool? 
• Separates Presentation from Functionality 
• Promotes Testability 
• Works great with Data Binding 
• Easy collaboration with Designers 
• Makes it easy to change out the View layer!
Universal Apps 
Sharing the love
Universal Apps 
• What are they? 
– One codebase to rule them all (on Windows, anyway) 
Source: https://dev.windows.com/en-us/develop/building-universal-Windows-apps
Universal Apps 
• Project type that came with Visual Studio 2013 Update 2
Universal Apps 
• Introduces concept of Universal Shared Project type 
– Essentially a code placeholder project 
• Does not compile on its own
Universal Shared Projects 
• Put common code in universal shared project 
– Platform-specific code in platform-specific projects 
• What is common? 
– Models 
– ViewModels 
– Converters 
– Services 
• What about views? 
– That depends…
Universal Shared Projects 
• A helpful Visual Studio extension 
– Shared Project Reference Manager 
• http://visualstudiogallery.msdn.microsoft.com/315c13a7-2787-4f57-bdf7-adae6ed54450
Dealing With Code Differences
Dealing With Code Differences 
• What is different? 
– Not a lot anymore! 
– Mostly platform features 
• Windows Charms 
• Sharing 
• Settings
Dealing With Code Differences 
• How can I deal with platform differences? 
– 3 techniques 
• Compiler Directives 
• Abstraction 
• Compiler Directives + Abstraction
Compiler Directives 
• Usage 
– Windows 
• #if WINDOWS_APP 
• NOTE: Was previously NETFX_CORE. Now both platforms define this. 
– Windows Phone 
• #if WINDOWS_PHONE_APP 
• NOTE: Was previously WINDOWS_PHONE 
• Pro 
– Easy 
• Con 
– Can be messy
Abstraction 
• Usage 
– Abstract platform-specific functionality into abstract class or interface 
• Pro 
– Clean 
• Con 
– Can be complex
Compiler Directives + Abstraction 
• Usage 
– Move compiler directives behind abstraction layer 
• Pro 
– Can keep the mess out of view models 
• Con 
– Still can be messy
Navigation
Navigation 
• Much simpler with Universal Apps! 
– Approach is now unified 
• View-driven with 1 optional parameter 
– Parameter can be anything 
• 2 Problems 
1. Logic for navigation is generally in ViewModel 
• ViewModels have to know about Views?!?! 
2. Not easily mocked in unit testing
Navigation 
• Solution 
– Provide abstraction layer for view model driven navigation
Navigation 
[Demo]
Application Settings
Application Settings 
• Store application settings 
– Locally 
• On device only, no sharing 
– Azure 
• Called Roaming Settings 
• Roamed settings can be shared with different platforms 
– In each store, assign same Package Family Name (PFN) to each app 
• http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn630421.aspx 
• Problem 
– Not easily mocked in unit tests
Application Settings 
• Solution 
– Provide abstraction layer
Application Settings 
[Demo]
Secondary Tiles
Secondary Tiles 
• Again, Universal Apps FTW! 
– Unified approach (from code perspective) 
• Main Difference 
– Windows requires user approval to pin/unpin tile 
– Windows Phone does not 
• Does that matter? 
– No! Same code, platforms just act differently 
• Problem 
– Not easily mocked in unit tests (sound familiar?)
Secondary Tiles 
• Solution 
– Provide abstraction layer
Secondary Tiles 
[Demo]
Contracts 
Windows 8.1
Contracts 
• What are they? 
– Agreements between one or more apps 
• Provide consistency across all apps
Examples of Contracts 
• Search 
• Share 
• Settings 
• Play To 
• File Picker 
• Cached File Updater
Contracts 
• Contracts You SHOULD Leverage 
– Search 
– Share 
– Settings 
• You HAVE to use this one with Internet access 
• Why? 
– Always available via Charms menu
Charms Menu
Share 
• Share content from your app 
• Can be context specific 
• Content can be shared in many formats 
– Different apps support different formats 
– Support as many formats as possible 
– Fire and forget
Share 
[Demo]
Settings 
• Change settings in your app 
• Any app-wide settings should go here 
• Users will be conditioned to use this
Settings 
• Things to consider 
– What app-wide settings will you need? 
– How can they be simplified? 
– How will changing them affect the UI? 
• Changes should be reflected immediately 
– Will you use the Internet? 
• If so, you MUST provide a privacy policy
Settings 
[Demo]
Unit testing
Unit Testing 
• Almost the same as .NET 
• Runs right alongside .NET tests in MSTest 
• Biggest Difference? 
– No Reflection.Emit namespace 
• Which means? 
– No mocking frameworks! 
– Have to hand roll all mocks
Unit testing 
[Demo]
What We Covered 
• MVVM 
• Universal Apps 
• Dealing with Code Differences 
• Navigation 
• Application Settings 
• Secondary Tiles 
• Contracts 
• Unit Testing
Questions? 
Please rate session at http://spkr8.com/t/37441!

Contenu connexe

Tendances

Acrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVMAcrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVMDong-Ho Lee
 
Dev-In-Town: Ultimate Data Visualization by Walter Wong
Dev-In-Town: Ultimate Data Visualization by Walter WongDev-In-Town: Ultimate Data Visualization by Walter Wong
Dev-In-Town: Ultimate Data Visualization by Walter WongQuek Lilian
 
Getting started with Xamarin forms
Getting started with Xamarin formsGetting started with Xamarin forms
Getting started with Xamarin formsSolTech, Inc.
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: AndroidJitendra Kumar
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesQamar Abbas
 
MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009Jonas Follesø
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMMudasir Qazi
 
MVVM - Model View ViewModel
MVVM - Model View ViewModelMVVM - Model View ViewModel
MVVM - Model View ViewModelDareen Alhiyari
 
Final presentation
Final presentationFinal presentation
Final presentationdsmo223
 
MVVM with WPF
MVVM with WPFMVVM with WPF
MVVM with WPFS V
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Jennie Gajjar
 
Windows Store Apps: Tips & Tricks
Windows Store Apps: Tips & TricksWindows Store Apps: Tips & Tricks
Windows Store Apps: Tips & TricksRobert MacLean
 
4Developers 2015: Twoja własna profesjonalna kontrolka WPF - tak jak robią to...
4Developers 2015: Twoja własna profesjonalna kontrolka WPF - tak jak robią to...4Developers 2015: Twoja własna profesjonalna kontrolka WPF - tak jak robią to...
4Developers 2015: Twoja własna profesjonalna kontrolka WPF - tak jak robią to...PROIDEA
 

Tendances (20)

Acrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVMAcrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVM
 
Dev-In-Town: Ultimate Data Visualization by Walter Wong
Dev-In-Town: Ultimate Data Visualization by Walter WongDev-In-Town: Ultimate Data Visualization by Walter Wong
Dev-In-Town: Ultimate Data Visualization by Walter Wong
 
Getting started with Xamarin forms
Getting started with Xamarin formsGetting started with Xamarin forms
Getting started with Xamarin forms
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
 
MVVM
MVVMMVVM
MVVM
 
Mobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelinesMobile App Architectures & Coding guidelines
Mobile App Architectures & Coding guidelines
 
No brainer
No brainerNo brainer
No brainer
 
MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009MVVM Design Pattern NDC2009
MVVM Design Pattern NDC2009
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
 
MVVM - Model View ViewModel
MVVM - Model View ViewModelMVVM - Model View ViewModel
MVVM - Model View ViewModel
 
Mvc part 1
Mvc part 1Mvc part 1
Mvc part 1
 
MVC
MVCMVC
MVC
 
What is MVC?
What is MVC?What is MVC?
What is MVC?
 
Final presentation
Final presentationFinal presentation
Final presentation
 
MVVM with WPF
MVVM with WPFMVVM with WPF
MVVM with WPF
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Visual Studio 2012 introduction
Visual Studio  2012 introductionVisual Studio  2012 introduction
Visual Studio 2012 introduction
 
Windows Store Apps: Tips & Tricks
Windows Store Apps: Tips & TricksWindows Store Apps: Tips & Tricks
Windows Store Apps: Tips & Tricks
 
4Developers 2015: Twoja własna profesjonalna kontrolka WPF - tak jak robią to...
4Developers 2015: Twoja własna profesjonalna kontrolka WPF - tak jak robią to...4Developers 2015: Twoja własna profesjonalna kontrolka WPF - tak jak robią to...
4Developers 2015: Twoja własna profesjonalna kontrolka WPF - tak jak robią to...
 

En vedette

Educ5105 presentation feb 5
Educ5105 presentation feb 5Educ5105 presentation feb 5
Educ5105 presentation feb 5jaccalder
 
Congress powerpoint (final)
Congress powerpoint (final)Congress powerpoint (final)
Congress powerpoint (final)shaw swafford
 
Differentiated instruction presentation
Differentiated instruction presentationDifferentiated instruction presentation
Differentiated instruction presentationb l
 
Powers of 10
Powers of 10Powers of 10
Powers of 10Earl Cote
 
Netwerken bij MarCom Noord-NL 09 04
Netwerken bij MarCom Noord-NL  09 04Netwerken bij MarCom Noord-NL  09 04
Netwerken bij MarCom Noord-NL 09 04derkeimers
 
words related to greeting
words related to greetingwords related to greeting
words related to greetingC.B. Balaban
 
Electricity and the environment
Electricity and the environment Electricity and the environment
Electricity and the environment jaccalder
 
Savior Skin Template
Savior Skin TemplateSavior Skin Template
Savior Skin TemplateMarcMooney
 
Social Media Week 2012 Panel : Beyond Facebook and Twitter
Social Media Week 2012 Panel : Beyond Facebook and TwitterSocial Media Week 2012 Panel : Beyond Facebook and Twitter
Social Media Week 2012 Panel : Beyond Facebook and TwitterMichoel Ogince
 
проба
пробапроба
пробаKOMBRIG
 
Value Driven Regulatory Use Case Simulation
Value Driven Regulatory Use Case Simulation Value Driven Regulatory Use Case Simulation
Value Driven Regulatory Use Case Simulation Aaron Benningfield
 
Mo Net New Product Presentation May 2012
Mo Net New Product Presentation May 2012Mo Net New Product Presentation May 2012
Mo Net New Product Presentation May 2012Phillip Ichikawa
 
Manitoulin 2014
Manitoulin 2014Manitoulin 2014
Manitoulin 2014jaccalder
 
Mídias sociais 2013 e o que você deve observar
Mídias sociais 2013 e o que você deve observarMídias sociais 2013 e o que você deve observar
Mídias sociais 2013 e o que você deve observarFernando Leroy
 
Comic story (2)
Comic story (2)Comic story (2)
Comic story (2)Ellh
 

En vedette (20)

Educ5105 presentation feb 5
Educ5105 presentation feb 5Educ5105 presentation feb 5
Educ5105 presentation feb 5
 
Jon eta iñigo
Jon eta iñigoJon eta iñigo
Jon eta iñigo
 
Plants(2)
Plants(2)Plants(2)
Plants(2)
 
Congress powerpoint (final)
Congress powerpoint (final)Congress powerpoint (final)
Congress powerpoint (final)
 
Differentiated instruction presentation
Differentiated instruction presentationDifferentiated instruction presentation
Differentiated instruction presentation
 
Powers of 10
Powers of 10Powers of 10
Powers of 10
 
Netwerken bij MarCom Noord-NL 09 04
Netwerken bij MarCom Noord-NL  09 04Netwerken bij MarCom Noord-NL  09 04
Netwerken bij MarCom Noord-NL 09 04
 
words related to greeting
words related to greetingwords related to greeting
words related to greeting
 
Electricity and the environment
Electricity and the environment Electricity and the environment
Electricity and the environment
 
Savior Skin Template
Savior Skin TemplateSavior Skin Template
Savior Skin Template
 
Social Media Week 2012 Panel : Beyond Facebook and Twitter
Social Media Week 2012 Panel : Beyond Facebook and TwitterSocial Media Week 2012 Panel : Beyond Facebook and Twitter
Social Media Week 2012 Panel : Beyond Facebook and Twitter
 
Microwaves
MicrowavesMicrowaves
Microwaves
 
проба
пробапроба
проба
 
Congress powerpoint
Congress powerpointCongress powerpoint
Congress powerpoint
 
Value Driven Regulatory Use Case Simulation
Value Driven Regulatory Use Case Simulation Value Driven Regulatory Use Case Simulation
Value Driven Regulatory Use Case Simulation
 
Mo Net New Product Presentation May 2012
Mo Net New Product Presentation May 2012Mo Net New Product Presentation May 2012
Mo Net New Product Presentation May 2012
 
Manitoulin 2014
Manitoulin 2014Manitoulin 2014
Manitoulin 2014
 
Mídias sociais 2013 e o que você deve observar
Mídias sociais 2013 e o que você deve observarMídias sociais 2013 e o que você deve observar
Mídias sociais 2013 e o que você deve observar
 
Comic story (2)
Comic story (2)Comic story (2)
Comic story (2)
 
resume
resumeresume
resume
 

Similaire à Building a Modern Windows App

Kevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile DevelopmentKevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile DevelopmentAxway Appcelerator
 
Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015Dominique Boutin
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for ChangeEric Wyles
 
Maximizing code reuse between Windows Phone 8 and Windows 8 (That Conference ...
Maximizing code reuse between Windows Phone 8 and Windows 8 (That Conference ...Maximizing code reuse between Windows Phone 8 and Windows 8 (That Conference ...
Maximizing code reuse between Windows Phone 8 and Windows 8 (That Conference ...Ken Cenerelli
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
Webview: The fifth element
Webview: The fifth elementWebview: The fifth element
Webview: The fifth elementFernando Cejas
 
"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejaswebcat
 
Universal Apps Oct 2014
Universal Apps Oct 2014Universal Apps Oct 2014
Universal Apps Oct 2014Joe Healy
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchHoward Greenberg
 
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...XebiaLabs
 
Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Ivano Malavolta
 
Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014Sean McCullough
 
Devops - why, what and how?
Devops - why, what and how?Devops - why, what and how?
Devops - why, what and how?Malinda Kapuruge
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Phil Leggetter
 
The XPages Mobile Controls: What's New in Notes 9.0.1
The XPages Mobile Controls: What's New in Notes 9.0.1The XPages Mobile Controls: What's New in Notes 9.0.1
The XPages Mobile Controls: What's New in Notes 9.0.1Teamstudio
 
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Derek Ashmore
 
ITPROCEED_WorkplaceMobility_Creating a seamless experience with ue v and wind...
ITPROCEED_WorkplaceMobility_Creating a seamless experience with ue v and wind...ITPROCEED_WorkplaceMobility_Creating a seamless experience with ue v and wind...
ITPROCEED_WorkplaceMobility_Creating a seamless experience with ue v and wind...ITProceed
 
Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinRikard Thulin
 

Similaire à Building a Modern Windows App (20)

Kevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile DevelopmentKevin Whinnery: Best Practices for Cross-Platform Mobile Development
Kevin Whinnery: Best Practices for Cross-Platform Mobile Development
 
Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015Dublin Unity User Group Meetup Sept 2015
Dublin Unity User Group Meetup Sept 2015
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for Change
 
Maximizing code reuse between Windows Phone 8 and Windows 8 (That Conference ...
Maximizing code reuse between Windows Phone 8 and Windows 8 (That Conference ...Maximizing code reuse between Windows Phone 8 and Windows 8 (That Conference ...
Maximizing code reuse between Windows Phone 8 and Windows 8 (That Conference ...
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
Webview: The fifth element
Webview: The fifth elementWebview: The fifth element
Webview: The fifth element
 
"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas"WebView, the fifth element" por @fernando_cejas
"WebView, the fifth element" por @fernando_cejas
 
Desktop Intro
Desktop IntroDesktop Intro
Desktop Intro
 
Universal Apps Oct 2014
Universal Apps Oct 2014Universal Apps Oct 2014
Universal Apps Oct 2014
 
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's WorkbenchAugust Webinar - Water Cooler Talks: A Look into a Developer's Workbench
August Webinar - Water Cooler Talks: A Look into a Developer's Workbench
 
Visual Basic User Interface-III
Visual Basic User Interface-IIIVisual Basic User Interface-III
Visual Basic User Interface-III
 
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
Developing a Hybrid Application Management and Deployment Strategy to JBoss a...
 
Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app Anatomy of an HTML 5 mobile web app
Anatomy of an HTML 5 mobile web app
 
Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014Transitioning Groupon to Node.js - EmpireJS 2014
Transitioning Groupon to Node.js - EmpireJS 2014
 
Devops - why, what and how?
Devops - why, what and how?Devops - why, what and how?
Devops - why, what and how?
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
 
The XPages Mobile Controls: What's New in Notes 9.0.1
The XPages Mobile Controls: What's New in Notes 9.0.1The XPages Mobile Controls: What's New in Notes 9.0.1
The XPages Mobile Controls: What's New in Notes 9.0.1
 
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
Application Deployment Patterns in the Cloud - NOVA Cloud and Software Engine...
 
ITPROCEED_WorkplaceMobility_Creating a seamless experience with ue v and wind...
ITPROCEED_WorkplaceMobility_Creating a seamless experience with ue v and wind...ITPROCEED_WorkplaceMobility_Creating a seamless experience with ue v and wind...
ITPROCEED_WorkplaceMobility_Creating a seamless experience with ue v and wind...
 
Building software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard ThulinBuilding software using Rich Clients Platforms Rikard Thulin
Building software using Rich Clients Platforms Rikard Thulin
 

Dernier

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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 organizationRadu Cotescu
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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...Neo4j
 
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...Martijn de Jong
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
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 Scriptwesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Dernier (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
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...
 
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...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Building a Modern Windows App

  • 1. Building a Modern Windows App Brent Edwards Principal Lead Consultant BrentE@magenic.com @brentledwards brentedwards.net https://github.com/brentedwards
  • 2. November 17-21 Royal Pacific Resort at Universal Orlando, FL More info: http://modernappslive.com Register and save money: http://bit.ly/LSPK27REG
  • 3. What We Will Cover • MVVM • Universal Apps • Dealing with Code Differences • Navigation • Application Settings • Secondary Tiles • Contracts • Unit Testing
  • 5. Charmed Framework • Open source, Windows-based MVVM support library – Windows 8.1 – Windows Phone 8.1 – Updated to Universal Apps • https://github.com/brentedwards/Charmed
  • 9. Why is MVVM Cool? • Separates Presentation from Functionality • Promotes Testability • Works great with Data Binding • Easy collaboration with Designers • Makes it easy to change out the View layer!
  • 11. Universal Apps • What are they? – One codebase to rule them all (on Windows, anyway) Source: https://dev.windows.com/en-us/develop/building-universal-Windows-apps
  • 12. Universal Apps • Project type that came with Visual Studio 2013 Update 2
  • 13. Universal Apps • Introduces concept of Universal Shared Project type – Essentially a code placeholder project • Does not compile on its own
  • 14. Universal Shared Projects • Put common code in universal shared project – Platform-specific code in platform-specific projects • What is common? – Models – ViewModels – Converters – Services • What about views? – That depends…
  • 15. Universal Shared Projects • A helpful Visual Studio extension – Shared Project Reference Manager • http://visualstudiogallery.msdn.microsoft.com/315c13a7-2787-4f57-bdf7-adae6ed54450
  • 16. Dealing With Code Differences
  • 17. Dealing With Code Differences • What is different? – Not a lot anymore! – Mostly platform features • Windows Charms • Sharing • Settings
  • 18. Dealing With Code Differences • How can I deal with platform differences? – 3 techniques • Compiler Directives • Abstraction • Compiler Directives + Abstraction
  • 19. Compiler Directives • Usage – Windows • #if WINDOWS_APP • NOTE: Was previously NETFX_CORE. Now both platforms define this. – Windows Phone • #if WINDOWS_PHONE_APP • NOTE: Was previously WINDOWS_PHONE • Pro – Easy • Con – Can be messy
  • 20. Abstraction • Usage – Abstract platform-specific functionality into abstract class or interface • Pro – Clean • Con – Can be complex
  • 21. Compiler Directives + Abstraction • Usage – Move compiler directives behind abstraction layer • Pro – Can keep the mess out of view models • Con – Still can be messy
  • 23. Navigation • Much simpler with Universal Apps! – Approach is now unified • View-driven with 1 optional parameter – Parameter can be anything • 2 Problems 1. Logic for navigation is generally in ViewModel • ViewModels have to know about Views?!?! 2. Not easily mocked in unit testing
  • 24. Navigation • Solution – Provide abstraction layer for view model driven navigation
  • 27. Application Settings • Store application settings – Locally • On device only, no sharing – Azure • Called Roaming Settings • Roamed settings can be shared with different platforms – In each store, assign same Package Family Name (PFN) to each app • http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn630421.aspx • Problem – Not easily mocked in unit tests
  • 28. Application Settings • Solution – Provide abstraction layer
  • 31. Secondary Tiles • Again, Universal Apps FTW! – Unified approach (from code perspective) • Main Difference – Windows requires user approval to pin/unpin tile – Windows Phone does not • Does that matter? – No! Same code, platforms just act differently • Problem – Not easily mocked in unit tests (sound familiar?)
  • 32. Secondary Tiles • Solution – Provide abstraction layer
  • 35. Contracts • What are they? – Agreements between one or more apps • Provide consistency across all apps
  • 36. Examples of Contracts • Search • Share • Settings • Play To • File Picker • Cached File Updater
  • 37. Contracts • Contracts You SHOULD Leverage – Search – Share – Settings • You HAVE to use this one with Internet access • Why? – Always available via Charms menu
  • 39. Share • Share content from your app • Can be context specific • Content can be shared in many formats – Different apps support different formats – Support as many formats as possible – Fire and forget
  • 41. Settings • Change settings in your app • Any app-wide settings should go here • Users will be conditioned to use this
  • 42. Settings • Things to consider – What app-wide settings will you need? – How can they be simplified? – How will changing them affect the UI? • Changes should be reflected immediately – Will you use the Internet? • If so, you MUST provide a privacy policy
  • 45. Unit Testing • Almost the same as .NET • Runs right alongside .NET tests in MSTest • Biggest Difference? – No Reflection.Emit namespace • Which means? – No mocking frameworks! – Have to hand roll all mocks
  • 47. What We Covered • MVVM • Universal Apps • Dealing with Code Differences • Navigation • Application Settings • Secondary Tiles • Contracts • Unit Testing
  • 48. Questions? Please rate session at http://spkr8.com/t/37441!