SlideShare uma empresa Scribd logo
1 de 36
Cross-Platform Apps with
Windows 8 & Windows Phone 8
Brent Edwards
Associate Principal Consultant
BrentE@magenic.com
@brentledwards
brentedwards.net
https://github.com/brentedwards
What We Will Cover
• MVVM
• Solution Structure
• Dealing with View Differences
• Dealing with Code Differences
• Navigation
• Application Settings
• Secondary Tiles
Introducing Charmed Framework
Charmed Framework
• Open source, cross-platform MVVM support library
– Windows 8
– Windows Phone 8
• 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!
Solution Structure
Laying the Foundation
Solution Structure
• Windows 8 and Windows Phone 8
– Same Kernel
– Compile Differently
– Different Project Types
Solution Structure
• My Approach: One Solution with Several Project Types
Solution Structure
• Leverage “Add As Link” Feature
Dealing With View Differences
Dealing With View Differences
• What can be re-used across platforms?
– Presentation Logic Code (C#)
• What can’t be re-used across platforms?
– Presentation Code (XAML)
• Why?
– Different flavors of XAML
• Different styling concepts supported
– Different controls available
• GridView and ListView on Windows 8
• LongListSelector on Windows Phone 8
Dealing With View Differences
• What can be re-used from the presentation?
– Some design assets
• How is that possible?
– Windows 8 Snap View: 320px fixed width
• Why 320px?
– Mobile designers are used to it
• Windows Phone 8 Design -> Windows 8 Snap View
Windows Phone Design Re-Use
[Demo]
Dealing With Code Differences
Dealing With Code Differences
• What is different?
– Navigation
• Same URI-based navigation scheme
• Accept parameters differently
– Application Settings
• Different classes
– Secondary Tiles
• Same concept, fundamentally different implementations
Dealing With Code Differences
• How can I deal with platform differences?
– 3 techniques
• Compiler Directives
• Abstraction
• Compiler Directives + Abstraction
Compiler Directives
• Usage
– Windows 8
• #if NETFX_CORE
– Windows Phone 8
• #if 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
• Both platforms use URI-based navigation
– They differ in their use of parameters
• Windows 8 allows 1 parameter
– Can be anything
• Windows Phone 8 uses query string
– Can have many parameters, must all be strings
• Neither implementation can be easily mocked for unit testing
Navigation
• Solution
– Provide consistent interface which takes 1 parameter
• Serialize that parameter to a string
Navigation
[Demo]
Application Settings
Application Settings
• Both platforms have very similar functionality
– Different classes involved
• Neither implementation can be easily mocked for unit testing
Application Settings
• Solution
– Provide consistent interface
• Use compiler directives in implementation
Application Settings
[Demo]
Secondary Tiles
Secondary Tiles
• Both platforms have similar concept, but fundamentally different implementations
• Windows 8
– Requires user approval to pin/unpin tile
– Always launches through App.xaml.cs
– Asynchronous
• Windows Phone 8
– Doesn’t need user approval to pin/unpin tile
– Can launch directly into a specific page
– Synchronous
Secondary Tiles
• Solution
– Provide consistent interface with platform-specific implementations
– Configure Windows Phone 8 to always launch through same page
Secondary Tiles
[Demo]
What We Covered
• MVVM
• Solution Structure
• Dealing with View Differences
• Dealing with Code Differences
• Navigation
• Application Settings
• Secondary Tiles
Questions?

Mais conteúdo relacionado

Mais procurados

Power shell basics day 2
Power shell basics day 2Power shell basics day 2
Power shell basics day 2Ashish Raj
 
Features of windows
Features of windowsFeatures of windows
Features of windowsmyrajendra
 
A Simple MVC Framework for Widget Development
A Simple MVC Framework for Widget DevelopmentA Simple MVC Framework for Widget Development
A Simple MVC Framework for Widget DevelopmentMartin Ebner
 
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
 
Crossover
CrossoverCrossover
Crossoverszlwzl
 
Selenium - what it is and what you can do with it
Selenium - what it is and what you can do with itSelenium - what it is and what you can do with it
Selenium - what it is and what you can do with itDavid Stark
 
Introducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test DevelopmentIntroducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test Developmentseleniumconf
 
Selenium Builder
Selenium BuilderSelenium Builder
Selenium BuilderDavid Stark
 

Mais procurados (11)

Power shell basics day 2
Power shell basics day 2Power shell basics day 2
Power shell basics day 2
 
Features of windows
Features of windowsFeatures of windows
Features of windows
 
Learn .net and develop the web applications
Learn .net and develop the web applicationsLearn .net and develop the web applications
Learn .net and develop the web applications
 
A Simple MVC Framework for Widget Development
A Simple MVC Framework for Widget DevelopmentA Simple MVC Framework for Widget Development
A Simple MVC Framework for Widget Development
 
Acrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVMAcrhitecture deisign pattern_MVC_MVP_MVVM
Acrhitecture deisign pattern_MVC_MVP_MVVM
 
Crossover
CrossoverCrossover
Crossover
 
Selenium - what it is and what you can do with it
Selenium - what it is and what you can do with itSelenium - what it is and what you can do with it
Selenium - what it is and what you can do with it
 
Introducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test DevelopmentIntroducing Selenium Builder – the Future of Test Development
Introducing Selenium Builder – the Future of Test Development
 
Selenium Builder
Selenium BuilderSelenium Builder
Selenium Builder
 
Mule m unit
Mule m unitMule m unit
Mule m unit
 
Evolution of wcf
Evolution of wcfEvolution of wcf
Evolution of wcf
 

Destaque

RISE & SHINE - tema ehälsa
RISE & SHINE - tema ehälsaRISE & SHINE - tema ehälsa
RISE & SHINE - tema ehälsaDag Forsén
 
Scdsb information and communication technology initiatives january 2011 final
Scdsb information and communication technology initiatives january 2011 finalScdsb information and communication technology initiatives january 2011 final
Scdsb information and communication technology initiatives january 2011 finaljaccalder
 
Primer on Economic Development
Primer on Economic DevelopmentPrimer on Economic Development
Primer on Economic DevelopmentStephanie Lindley
 
Netbook trial 21st century learning 2010
Netbook trial 21st century learning 2010Netbook trial 21st century learning 2010
Netbook trial 21st century learning 2010cummingscraig
 
Taller salud ocupacional
Taller salud ocupacionalTaller salud ocupacional
Taller salud ocupacionalguest531f33
 
Getting to the Heart of the Matter: Communities and Health Systems Strengthening
Getting to the Heart of the Matter: Communities and Health Systems StrengtheningGetting to the Heart of the Matter: Communities and Health Systems Strengthening
Getting to the Heart of the Matter: Communities and Health Systems Strengtheningjehill3
 
Haal meer uit je website / vergroot je online rendement
Haal meer uit je website / vergroot je online rendementHaal meer uit je website / vergroot je online rendement
Haal meer uit je website / vergroot je online rendementWieger Waardenburg
 
Data slidedeck
Data slidedeck Data slidedeck
Data slidedeck jaccalder
 
Incidence of posterior capsular opacification in rigid pmma
Incidence of posterior capsular opacification in rigid pmmaIncidence of posterior capsular opacification in rigid pmma
Incidence of posterior capsular opacification in rigid pmmaDr. Anand Sudhalkar
 
Pdf birmingham digital advantge 1
Pdf birmingham digital advantge 1Pdf birmingham digital advantge 1
Pdf birmingham digital advantge 1andylovatt
 
Changing trends in ophthalmic practice 2
Changing trends in ophthalmic practice 2Changing trends in ophthalmic practice 2
Changing trends in ophthalmic practice 2Dr. Anand Sudhalkar
 
Polypill poster Istanbul, Nov 2014
Polypill poster Istanbul, Nov 2014Polypill poster Istanbul, Nov 2014
Polypill poster Istanbul, Nov 2014Dr. Anand Sudhalkar
 

Destaque (20)

RISE & SHINE - tema ehälsa
RISE & SHINE - tema ehälsaRISE & SHINE - tema ehälsa
RISE & SHINE - tema ehälsa
 
Scdsb information and communication technology initiatives january 2011 final
Scdsb information and communication technology initiatives january 2011 finalScdsb information and communication technology initiatives january 2011 final
Scdsb information and communication technology initiatives january 2011 final
 
Dinnershow of Dreams
Dinnershow of DreamsDinnershow of Dreams
Dinnershow of Dreams
 
Proyecto Basuras
Proyecto BasurasProyecto Basuras
Proyecto Basuras
 
Primer on Economic Development
Primer on Economic DevelopmentPrimer on Economic Development
Primer on Economic Development
 
European Venture Market
European Venture MarketEuropean Venture Market
European Venture Market
 
Doc4400
Doc4400Doc4400
Doc4400
 
Netbook trial 21st century learning 2010
Netbook trial 21st century learning 2010Netbook trial 21st century learning 2010
Netbook trial 21st century learning 2010
 
Taller salud ocupacional
Taller salud ocupacionalTaller salud ocupacional
Taller salud ocupacional
 
Getting to the Heart of the Matter: Communities and Health Systems Strengthening
Getting to the Heart of the Matter: Communities and Health Systems StrengtheningGetting to the Heart of the Matter: Communities and Health Systems Strengthening
Getting to the Heart of the Matter: Communities and Health Systems Strengthening
 
Haal meer uit je website / vergroot je online rendement
Haal meer uit je website / vergroot je online rendementHaal meer uit je website / vergroot je online rendement
Haal meer uit je website / vergroot je online rendement
 
Data slidedeck
Data slidedeck Data slidedeck
Data slidedeck
 
Incidence of posterior capsular opacification in rigid pmma
Incidence of posterior capsular opacification in rigid pmmaIncidence of posterior capsular opacification in rigid pmma
Incidence of posterior capsular opacification in rigid pmma
 
Fundus fluorescein angiography
Fundus fluorescein angiographyFundus fluorescein angiography
Fundus fluorescein angiography
 
S s
S sS s
S s
 
Two suns 2
Two suns 2Two suns 2
Two suns 2
 
Pdf birmingham digital advantge 1
Pdf birmingham digital advantge 1Pdf birmingham digital advantge 1
Pdf birmingham digital advantge 1
 
Changing trends in ophthalmic practice 2
Changing trends in ophthalmic practice 2Changing trends in ophthalmic practice 2
Changing trends in ophthalmic practice 2
 
Perimetros areas para blogs
Perimetros areas para blogsPerimetros areas para blogs
Perimetros areas para blogs
 
Polypill poster Istanbul, Nov 2014
Polypill poster Istanbul, Nov 2014Polypill poster Istanbul, Nov 2014
Polypill poster Istanbul, Nov 2014
 

Semelhante a Cross Platform Apps with Windows 8 & Windows Phone 8

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
 
Maximizing code reuse between Windows Phone 8 and Windows 8 (DevTeach Toronto...
Maximizing code reuse between Windows Phone 8 and Windows 8 (DevTeach Toronto...Maximizing code reuse between Windows Phone 8 and Windows 8 (DevTeach Toronto...
Maximizing code reuse between Windows Phone 8 and Windows 8 (DevTeach Toronto...Ken Cenerelli
 
Architectural Design & Patterns
Architectural Design&PatternsArchitectural Design&Patterns
Architectural Design & PatternsInocentshuja Ahmad
 
Building apps for WP8 and Win8
Building apps for WP8 and Win8Building apps for WP8 and Win8
Building apps for WP8 and Win8Laurent Duveau
 
Difference between .net core and .net framework
Difference between .net core and .net frameworkDifference between .net core and .net framework
Difference between .net core and .net frameworkAnsi Bytecode
 
Foundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose ApplicationsFoundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose ApplicationsChing-Hwa Yu
 
Unboxing ASP.NET Core
Unboxing ASP.NET CoreUnboxing ASP.NET Core
Unboxing ASP.NET CoreKevin Leung
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMChris Bannon
 
Introduction_to_NET.ppt
Introduction_to_NET.pptIntroduction_to_NET.ppt
Introduction_to_NET.pptDarwin Terraza
 
Generic repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkGeneric repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkMd. Mahedee Hasan
 
Generic Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EFGeneric Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EFMd. Mahedee Hasan
 
Accelerating time to delivery: Modernizing Application Development
Accelerating time to delivery: Modernizing Application DevelopmentAccelerating time to delivery: Modernizing Application Development
Accelerating time to delivery: Modernizing Application DevelopmentMicro Focus
 
The .NET Platform - A Brief Overview
The .NET Platform - A Brief OverviewThe .NET Platform - A Brief Overview
The .NET Platform - A Brief OverviewCarlos Lopes
 
Develop business apps cross-platform development using visual studio with x...
Develop business apps   cross-platform development using visual studio with x...Develop business apps   cross-platform development using visual studio with x...
Develop business apps cross-platform development using visual studio with x...Alexander Meijers
 
CICD Pipelines for Microservices: Lessons from the Trenches
CICD Pipelines for Microservices: Lessons from the TrenchesCICD Pipelines for Microservices: Lessons from the Trenches
CICD Pipelines for Microservices: Lessons from the TrenchesCodefresh
 
Cloud Native Engineering with SRE and GitOps
Cloud Native Engineering with SRE and GitOpsCloud Native Engineering with SRE and GitOps
Cloud Native Engineering with SRE and GitOpsWeaveworks
 

Semelhante a Cross Platform Apps with Windows 8 & Windows Phone 8 (20)

Visual Basic User Interface-III
Visual Basic User Interface-IIIVisual Basic User Interface-III
Visual Basic User Interface-III
 
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
 
Maximizing code reuse between Windows Phone 8 and Windows 8 (DevTeach Toronto...
Maximizing code reuse between Windows Phone 8 and Windows 8 (DevTeach Toronto...Maximizing code reuse between Windows Phone 8 and Windows 8 (DevTeach Toronto...
Maximizing code reuse between Windows Phone 8 and Windows 8 (DevTeach Toronto...
 
Architectural Design & Patterns
Architectural Design&PatternsArchitectural Design&Patterns
Architectural Design & Patterns
 
Building apps for WP8 and Win8
Building apps for WP8 and Win8Building apps for WP8 and Win8
Building apps for WP8 and Win8
 
Difference between .net core and .net framework
Difference between .net core and .net frameworkDifference between .net core and .net framework
Difference between .net core and .net framework
 
Foundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose ApplicationsFoundational Design Patterns for Multi-Purpose Applications
Foundational Design Patterns for Multi-Purpose Applications
 
Unboxing ASP.NET Core
Unboxing ASP.NET CoreUnboxing ASP.NET Core
Unboxing ASP.NET Core
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVM
 
Introduction_to_NET.ppt
Introduction_to_NET.pptIntroduction_to_NET.ppt
Introduction_to_NET.ppt
 
Generic repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity FrameworkGeneric repository pattern with ASP.NET MVC and Entity Framework
Generic repository pattern with ASP.NET MVC and Entity Framework
 
Generic Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EFGeneric Repository Pattern with ASP.NET MVC and EF
Generic Repository Pattern with ASP.NET MVC and EF
 
Design pattern
Design patternDesign pattern
Design pattern
 
Accelerating time to delivery: Modernizing Application Development
Accelerating time to delivery: Modernizing Application DevelopmentAccelerating time to delivery: Modernizing Application Development
Accelerating time to delivery: Modernizing Application Development
 
The .NET Platform - A Brief Overview
The .NET Platform - A Brief OverviewThe .NET Platform - A Brief Overview
The .NET Platform - A Brief Overview
 
AToMPM - Features
AToMPM - FeaturesAToMPM - Features
AToMPM - Features
 
Develop business apps cross-platform development using visual studio with x...
Develop business apps   cross-platform development using visual studio with x...Develop business apps   cross-platform development using visual studio with x...
Develop business apps cross-platform development using visual studio with x...
 
CICD Pipelines for Microservices: Lessons from the Trenches
CICD Pipelines for Microservices: Lessons from the TrenchesCICD Pipelines for Microservices: Lessons from the Trenches
CICD Pipelines for Microservices: Lessons from the Trenches
 
Cloud Native Engineering with SRE and GitOps
Cloud Native Engineering with SRE and GitOpsCloud Native Engineering with SRE and GitOps
Cloud Native Engineering with SRE and GitOps
 

Último

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
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...Miguel Araújo
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
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
 
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
 
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
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Último (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
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...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Cross Platform Apps with Windows 8 & Windows Phone 8

  • 1. Cross-Platform Apps with Windows 8 & Windows Phone 8 Brent Edwards Associate Principal Consultant BrentE@magenic.com @brentledwards brentedwards.net https://github.com/brentedwards
  • 2. What We Will Cover • MVVM • Solution Structure • Dealing with View Differences • Dealing with Code Differences • Navigation • Application Settings • Secondary Tiles
  • 4. Charmed Framework • Open source, cross-platform MVVM support library – Windows 8 – Windows Phone 8 • https://github.com/brentedwards/Charmed
  • 8. 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!
  • 10. Solution Structure • Windows 8 and Windows Phone 8 – Same Kernel – Compile Differently – Different Project Types
  • 11. Solution Structure • My Approach: One Solution with Several Project Types
  • 12. Solution Structure • Leverage “Add As Link” Feature
  • 13. Dealing With View Differences
  • 14. Dealing With View Differences • What can be re-used across platforms? – Presentation Logic Code (C#) • What can’t be re-used across platforms? – Presentation Code (XAML) • Why? – Different flavors of XAML • Different styling concepts supported – Different controls available • GridView and ListView on Windows 8 • LongListSelector on Windows Phone 8
  • 15. Dealing With View Differences • What can be re-used from the presentation? – Some design assets • How is that possible? – Windows 8 Snap View: 320px fixed width • Why 320px? – Mobile designers are used to it • Windows Phone 8 Design -> Windows 8 Snap View
  • 16. Windows Phone Design Re-Use [Demo]
  • 17. Dealing With Code Differences
  • 18. Dealing With Code Differences • What is different? – Navigation • Same URI-based navigation scheme • Accept parameters differently – Application Settings • Different classes – Secondary Tiles • Same concept, fundamentally different implementations
  • 19. Dealing With Code Differences • How can I deal with platform differences? – 3 techniques • Compiler Directives • Abstraction • Compiler Directives + Abstraction
  • 20. Compiler Directives • Usage – Windows 8 • #if NETFX_CORE – Windows Phone 8 • #if WINDOWS_PHONE • Pro – Easy • Con – Can be messy
  • 21. Abstraction • Usage – Abstract platform-specific functionality into abstract class or interface • Pro – Clean • Con – Can be complex
  • 22. Compiler Directives + Abstraction • Usage – Move compiler directives behind abstraction layer • Pro – Can keep the mess out of view models • Con – Still can be messy
  • 24. Navigation • Both platforms use URI-based navigation – They differ in their use of parameters • Windows 8 allows 1 parameter – Can be anything • Windows Phone 8 uses query string – Can have many parameters, must all be strings • Neither implementation can be easily mocked for unit testing
  • 25. Navigation • Solution – Provide consistent interface which takes 1 parameter • Serialize that parameter to a string
  • 28. Application Settings • Both platforms have very similar functionality – Different classes involved • Neither implementation can be easily mocked for unit testing
  • 29. Application Settings • Solution – Provide consistent interface • Use compiler directives in implementation
  • 32. Secondary Tiles • Both platforms have similar concept, but fundamentally different implementations • Windows 8 – Requires user approval to pin/unpin tile – Always launches through App.xaml.cs – Asynchronous • Windows Phone 8 – Doesn’t need user approval to pin/unpin tile – Can launch directly into a specific page – Synchronous
  • 33. Secondary Tiles • Solution – Provide consistent interface with platform-specific implementations – Configure Windows Phone 8 to always launch through same page
  • 35. What We Covered • MVVM • Solution Structure • Dealing with View Differences • Dealing with Code Differences • Navigation • Application Settings • Secondary Tiles