SlideShare ist ein Scribd-Unternehmen logo
1 von 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?

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer 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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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 educationjfdjdjcjdnsjd
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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.pdfsudhanshuwaghmare1
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
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...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
 
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...Principled Technologies
 
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
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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
 
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
 

Kürzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer 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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
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...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
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
 
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...
 
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
 
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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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?
 
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
 

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