SlideShare a Scribd company logo
An end-to-end experience of Windows Phone 7 development (Part 1)
Rudi Groblerhttp://www.rudigrobler.net@rudigroblerAn end-to-end experience of Windows Phone 7 developmentTRACK: NEXT GENERATION
agenda
orientation supportPhoneApplicationPage.SupportedOrientations property states what orientations the page supportsPortraitLandscapePortraitOrLandscapeIf set to PortraitOrLandscape, page will re-orientate itself automatically when the user rotates the phoneYou cannot force a page to re-orientate in codeYou can force a page to always use a specific orientation by setting the SupportedOrientations property to the value you required
Orientation using VSMdemo
orientation + SIPSIP takes up more space landscape than portraitvs
system tray and application barSystem TraySystem owned indicator area that display system-level status informationApps can show/hideApplication BarArea where applications can display buttons for the most common tasksCan display pop-up menu for less common tasks
application barUse the ApplicationBar instead of creating your own menu systemUp to 4 buttons plus optional menuSwipe up the bar to bring up the menuAll buttons must specify Text property as well as IconUrl (Changed in Beta)Don’t fill all 4 slots if not neededUse white foreground on transparent background for iconsSystem will colorize button according to users selected theme
Application bar
application barPage scoped – Search, etcNot for item specific actions like save/delete, rather use the ContextMenuAbove SIP
basic application lifecycle
Low Batterya world of interruptionsPhone CallsLock ScreenText MessageRemindersApplication Switch
Application lifecycle – the problem
moved to backgroundSave stateDormantTombstonedRestore stateFast switching a.k.a. dormant
application managementWindows Phone execution model is designed to provide end users with a fast, responsive experienceOnly one application can run at a timeSystem terminates application when user navigates awayApplication is Tombstoned when user navigates awaySystem saves state information then terminates you applicationWhen user navigates back to the application system restarts the application and passes state information backDeveloper must write code to respond to lifecycle eventsSave and restore stateMaintain illusion that the application is running continuouslyCheck if tombstoned (IsAppInstancePreserved)
lifecycle events - applicationApplication_LaunchingWhen the application is launching (from start)Not fired when the application is reactivatedApplication_ActivatedWhen application is activated (brought to foreground)Not fired when the application is first launchedApplication_DeactivatedWhen the application is deactivated (sent to background)Not fired when the application is closingApplication_ClosingWhen the application is closing (user hit back)Not fired when the application is deactivated
lifecycle events - pageOnNavigateToOnNavigateFrom
Application lifecycle – the solution
optimizing tombstoning (1)Know whatto savePivot.SelectedItemTIP: Set in Loaded and NOT NavigateToPanorama.DefaultItemScrollViewer position (use ScrollPositionHelper)TextBox.TextViewModelWhereto savePhoneApplicationService.Current.State[]PhoneApplicationPage.State[]Cache to IsolatedStorageWhento saveApplication life cycle eventsPage-level OnNavigateFrom/OnNavigateToDo not save state on back navigation
optimizing tombstoning (2)Optimize your storage formatsDataContractSerializerJSON.NET (MS implementation is VERY slow)XMLBinary (More work but VERY fast)MUST rehydrate in less than 10 secondsDefer loading when possible
optimizing tombstoning (3)Release resourcesCamera, Video, Location, Sensor, etcOn rehydrate/activate, remember GPS warm-up timeFramework will stop audio, sensors, networking, sockets, MediaElement & camera
Test your tombstoning!!!
phone threading model Touch thread
PerformanceProgressBar“The ProgressBar template for Silverlight that is built into the Windows Phone today has a negative performance cost in ‘indeterminate’ mode (the animating dots that often indicate loading during an operation of unknown time). The control is also known as ‘progress indicator’ according to the UX guidelines for the phone.”Use PerformanceProgressBar (Available in the Silverlight Toolkit for Windows Phone)Read more on Jeff Wilcox’s blog:http://bit.ly/PerformanceProgressBarProgressIndicator
LowProfileImageLoader“LowProfileImageLoaderis meant to address a very specific scenario: loading lots of images from the web at the same time.”Read more on David Anson’s blog:http://bit.ly/LowProfileImageLoaderImage decoding on background thread
Location+ Accuracy-  Power-  Speed-  Indoors-  Accuracy+ Power+ Speed-  Wilderness+/- Accuracy+/- Power+/- Speed+/- Urban areasLocation servicesWiFiCell towers
Location
GeoCoordinateWatcherWarm it upSingletonCan be disabled
persistenceAll IO is restricted to Isolated StorageCreate files Manage SettingsIdeal for caching dataCheck out WP7Contrib and AgFxIsolated Storage based Relational DBsSterlingSQLiteStructured storage
performance countersApplication.Current.Host.Settings.EnableFrameRateCounter= true;
push notificationsServer-initiated communicationEnable key background scenariosPreserves battery life and user experiencePrevents polling for updates
types of notificationsToastTileDeep toast
Push Notification ArchitectureCloud ServiceWindows Phone 7Push URI to Cloud Service4Push enabled applicationPush URI request/response13HTTP Post to URI with payload5Push notification to devicePush client service62Push client/server negotiationMPNS
Scenarios/Popular ApplicationsWeather AppsChess by PostSend to WP7Weather TileWarning ToastTurn TileMove ToastLink TileLink ToastBeezzSeattle Traffic MapAlphaJaxThere are hundreds and hundreds of Push apps in Marketplace!Unread TileDirect ToastTraffic TileTurn TileMove Toast
Windows Push Notification Server Side Helper Library“The library provides an easy way for sending all three kinds of push notification messages currently supported by Microsoft Push Notification Services (MPNS): Tile, Toast, and Raw. Our main goal here is to extract any complexity for sending push notification (PN) messages from your website (or web service) to a Windows Phone. This library helps developers to send push messages using only a few lines of code.”Read more on the Windows Phone Developer blog:http://bit.ly/PushNotificationHelper
don’t re-invent the wheelControl ToolkitsPhoneyToolsCoding4Fun ToolkitSilverlight Toolkit for Windows PhoneWP7ContribMVVM ToolkitsMVVM LightCaliburn.MicroDatabasesSterlingSQLiteAgFx
NuGet
text inputTextBoxintegrates with the software keyboardSoftware keyboard supports input scopingKey InputScopes: EmailNameOrAddressTextUrlNumberTimeTelephoneNumberPasswordBox has a 1 second delayText Text Revolution: A Game that Improves Text Entry on Mobile Touchscreen Keyboards
Text input
memory constraintsDo not use more than 90mb of RAMUse Coding4Fun Toolkit MemoryCounter+/- 30% reduction in working set
Certification checklistNo network, no problem?<90MB?Theme aware?Handles exceptions?Back button works as expected?User consent dialogs & settings
Monitor your applicationAdd a “Send Feedback” buttonStore crash data and ask user to email itAnalytics
@rudigroblerSlides, demos, etc…http://www.rudigrobler.netquestions
Don’t forget the Xbox Kinectshow-down after sessions this evening!
DevDays 2011 SponsorsPLATINUM SPONSORwww.bbd.co.zaSILVER SPONSORwww.dvt.co.zaSILVER SPONSORwww.ctutraining.co.za
Keep in Touchfacebook.com/msdevsa@msdevsahttp://blogs.msdn.com/southafrica
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation.  Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.  MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related Content

KEY
Flash Builder and Flex Future - Multiscreen Development
ODP
Developing for Mobile with the Flex Framework
PPT
Development With eRCP
PPT
Developing Mobile Applications using Flex 4.5
DOCX
Bugzilla
PPTX
Building apps for multiple devices
PPT
Desarrollo AIR Mobile
PPTX
Build 2017 - P4115 - Go big! Optimizing your applications for large screen ex...
Flash Builder and Flex Future - Multiscreen Development
Developing for Mobile with the Flex Framework
Development With eRCP
Developing Mobile Applications using Flex 4.5
Bugzilla
Building apps for multiple devices
Desarrollo AIR Mobile
Build 2017 - P4115 - Go big! Optimizing your applications for large screen ex...

What's hot (20)

PPTX
An end-to-end experience of Windows Phone 7 development (Part 2)
PDF
Xamarin Forms - Hello World with Vitamins
PDF
Lublin Startup Festival - Mobile Architecture Design Patterns
PDF
QBS Visual Studio 2012 and modern windows apps
PPTX
Performance testing – mobile apps session1
PDF
Appium Interview Questions and Answers | Edureka
PDF
Mobile App Development
PDF
Windows phone 7 overview
PDF
Mobile Test Automation
PDF
Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...
PDF
iTunes App Store Submission Process
PPT
Titanium Meetup Deck
PPTX
Mobile automation testing with selenium and appium
PDF
IBM MobileFirst Platform v7.0 pot intro v0.1
PDF
Adobe AIR Mobile development for Android and PlayBook
PDF
Advanced Appium Tips & Tricks with Jonathan Lipps
PDF
Xamarin.Forms Hands On Lab (Intermediate)
PPTX
Appium meet up noida
PDF
Xamarin.Forms Hands On Lab (Advanced)
PDF
Cross platform apps using Xamarin
An end-to-end experience of Windows Phone 7 development (Part 2)
Xamarin Forms - Hello World with Vitamins
Lublin Startup Festival - Mobile Architecture Design Patterns
QBS Visual Studio 2012 and modern windows apps
Performance testing – mobile apps session1
Appium Interview Questions and Answers | Edureka
Mobile App Development
Windows phone 7 overview
Mobile Test Automation
Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...
iTunes App Store Submission Process
Titanium Meetup Deck
Mobile automation testing with selenium and appium
IBM MobileFirst Platform v7.0 pot intro v0.1
Adobe AIR Mobile development for Android and PlayBook
Advanced Appium Tips & Tricks with Jonathan Lipps
Xamarin.Forms Hands On Lab (Intermediate)
Appium meet up noida
Xamarin.Forms Hands On Lab (Advanced)
Cross platform apps using Xamarin
Ad

Viewers also liked (8)

PDF
ありがとうすまこん@横浜3年間ちょっとの奇跡
PPTX
Magic solution mind map
PDF
ITツールのイベント活用術
PDF
スマートフォンは日用品なんかじゃないぞ!
PPTX
スマートフォンで使うWebアプリ
PPTX
わたしがAndroidに変えたわけ
PDF
スマートフォン懇親会special
PDF
Androidの会のご紹介
ありがとうすまこん@横浜3年間ちょっとの奇跡
Magic solution mind map
ITツールのイベント活用術
スマートフォンは日用品なんかじゃないぞ!
スマートフォンで使うWebアプリ
わたしがAndroidに変えたわけ
スマートフォン懇親会special
Androidの会のご紹介
Ad

Similar to An end-to-end experience of Windows Phone 7 development (Part 1) (20)

PPTX
Cool Stuff Your App Can Do
PDF
Windows phone 7 series
PDF
follow-app BOOTCAMP 2: Windows phone fast application switching
PPTX
Windows Phone 7 Architecture Overview
PPTX
데브멘토 발표세미나
PPTX
Windows Phone 7.5 Mango - What's New
PPTX
Windows Phone Application Platform
PPTX
What's new in Windows Phone Mango for Developers
PPTX
Developing windows phone 7 application with silverlight
PPTX
Windows phone7 subodh
PPSX
Developing Application in WP7
PPTX
Windows Phone Apps Development overview
PDF
03.Controls in Windows Phone
PPTX
Windows Phone 7 Now
PPTX
A Day in the Life of a Metro-veloper
PPTX
Designing and developing a Windows Phone 7 Silverlight Application End-to-End...
PPTX
Windows Phone 7 and Silverlight
PPTX
Windows Phone Garage - Application Jumpstart
PPTX
Windows 8 BootCamp
PPTX
Windows Phone 7 Unleashed Session 2
Cool Stuff Your App Can Do
Windows phone 7 series
follow-app BOOTCAMP 2: Windows phone fast application switching
Windows Phone 7 Architecture Overview
데브멘토 발표세미나
Windows Phone 7.5 Mango - What's New
Windows Phone Application Platform
What's new in Windows Phone Mango for Developers
Developing windows phone 7 application with silverlight
Windows phone7 subodh
Developing Application in WP7
Windows Phone Apps Development overview
03.Controls in Windows Phone
Windows Phone 7 Now
A Day in the Life of a Metro-veloper
Designing and developing a Windows Phone 7 Silverlight Application End-to-End...
Windows Phone 7 and Silverlight
Windows Phone Garage - Application Jumpstart
Windows 8 BootCamp
Windows Phone 7 Unleashed Session 2

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPT
Teaching material agriculture food technology
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
KodekX | Application Modernization Development
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Spectroscopy.pptx food analysis technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Chapter 3 Spatial Domain Image Processing.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Teaching material agriculture food technology
Reach Out and Touch Someone: Haptics and Empathic Computing
Unlocking AI with Model Context Protocol (MCP)
Encapsulation_ Review paper, used for researhc scholars
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
KodekX | Application Modernization Development
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Review of recent advances in non-invasive hemoglobin estimation
Spectroscopy.pptx food analysis technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Understanding_Digital_Forensics_Presentation.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Chapter 3 Spatial Domain Image Processing.pdf

An end-to-end experience of Windows Phone 7 development (Part 1)

  • 2. Rudi Groblerhttp://www.rudigrobler.net@rudigroblerAn end-to-end experience of Windows Phone 7 developmentTRACK: NEXT GENERATION
  • 4. orientation supportPhoneApplicationPage.SupportedOrientations property states what orientations the page supportsPortraitLandscapePortraitOrLandscapeIf set to PortraitOrLandscape, page will re-orientate itself automatically when the user rotates the phoneYou cannot force a page to re-orientate in codeYou can force a page to always use a specific orientation by setting the SupportedOrientations property to the value you required
  • 6. orientation + SIPSIP takes up more space landscape than portraitvs
  • 7. system tray and application barSystem TraySystem owned indicator area that display system-level status informationApps can show/hideApplication BarArea where applications can display buttons for the most common tasksCan display pop-up menu for less common tasks
  • 8. application barUse the ApplicationBar instead of creating your own menu systemUp to 4 buttons plus optional menuSwipe up the bar to bring up the menuAll buttons must specify Text property as well as IconUrl (Changed in Beta)Don’t fill all 4 slots if not neededUse white foreground on transparent background for iconsSystem will colorize button according to users selected theme
  • 10. application barPage scoped – Search, etcNot for item specific actions like save/delete, rather use the ContextMenuAbove SIP
  • 12. Low Batterya world of interruptionsPhone CallsLock ScreenText MessageRemindersApplication Switch
  • 14. moved to backgroundSave stateDormantTombstonedRestore stateFast switching a.k.a. dormant
  • 15. application managementWindows Phone execution model is designed to provide end users with a fast, responsive experienceOnly one application can run at a timeSystem terminates application when user navigates awayApplication is Tombstoned when user navigates awaySystem saves state information then terminates you applicationWhen user navigates back to the application system restarts the application and passes state information backDeveloper must write code to respond to lifecycle eventsSave and restore stateMaintain illusion that the application is running continuouslyCheck if tombstoned (IsAppInstancePreserved)
  • 16. lifecycle events - applicationApplication_LaunchingWhen the application is launching (from start)Not fired when the application is reactivatedApplication_ActivatedWhen application is activated (brought to foreground)Not fired when the application is first launchedApplication_DeactivatedWhen the application is deactivated (sent to background)Not fired when the application is closingApplication_ClosingWhen the application is closing (user hit back)Not fired when the application is deactivated
  • 17. lifecycle events - pageOnNavigateToOnNavigateFrom
  • 19. optimizing tombstoning (1)Know whatto savePivot.SelectedItemTIP: Set in Loaded and NOT NavigateToPanorama.DefaultItemScrollViewer position (use ScrollPositionHelper)TextBox.TextViewModelWhereto savePhoneApplicationService.Current.State[]PhoneApplicationPage.State[]Cache to IsolatedStorageWhento saveApplication life cycle eventsPage-level OnNavigateFrom/OnNavigateToDo not save state on back navigation
  • 20. optimizing tombstoning (2)Optimize your storage formatsDataContractSerializerJSON.NET (MS implementation is VERY slow)XMLBinary (More work but VERY fast)MUST rehydrate in less than 10 secondsDefer loading when possible
  • 21. optimizing tombstoning (3)Release resourcesCamera, Video, Location, Sensor, etcOn rehydrate/activate, remember GPS warm-up timeFramework will stop audio, sensors, networking, sockets, MediaElement & camera
  • 23. phone threading model Touch thread
  • 24. PerformanceProgressBar“The ProgressBar template for Silverlight that is built into the Windows Phone today has a negative performance cost in ‘indeterminate’ mode (the animating dots that often indicate loading during an operation of unknown time). The control is also known as ‘progress indicator’ according to the UX guidelines for the phone.”Use PerformanceProgressBar (Available in the Silverlight Toolkit for Windows Phone)Read more on Jeff Wilcox’s blog:http://bit.ly/PerformanceProgressBarProgressIndicator
  • 25. LowProfileImageLoader“LowProfileImageLoaderis meant to address a very specific scenario: loading lots of images from the web at the same time.”Read more on David Anson’s blog:http://bit.ly/LowProfileImageLoaderImage decoding on background thread
  • 26. Location+ Accuracy- Power- Speed- Indoors- Accuracy+ Power+ Speed- Wilderness+/- Accuracy+/- Power+/- Speed+/- Urban areasLocation servicesWiFiCell towers
  • 29. persistenceAll IO is restricted to Isolated StorageCreate files Manage SettingsIdeal for caching dataCheck out WP7Contrib and AgFxIsolated Storage based Relational DBsSterlingSQLiteStructured storage
  • 31. push notificationsServer-initiated communicationEnable key background scenariosPreserves battery life and user experiencePrevents polling for updates
  • 33. Push Notification ArchitectureCloud ServiceWindows Phone 7Push URI to Cloud Service4Push enabled applicationPush URI request/response13HTTP Post to URI with payload5Push notification to devicePush client service62Push client/server negotiationMPNS
  • 34. Scenarios/Popular ApplicationsWeather AppsChess by PostSend to WP7Weather TileWarning ToastTurn TileMove ToastLink TileLink ToastBeezzSeattle Traffic MapAlphaJaxThere are hundreds and hundreds of Push apps in Marketplace!Unread TileDirect ToastTraffic TileTurn TileMove Toast
  • 35. Windows Push Notification Server Side Helper Library“The library provides an easy way for sending all three kinds of push notification messages currently supported by Microsoft Push Notification Services (MPNS): Tile, Toast, and Raw. Our main goal here is to extract any complexity for sending push notification (PN) messages from your website (or web service) to a Windows Phone. This library helps developers to send push messages using only a few lines of code.”Read more on the Windows Phone Developer blog:http://bit.ly/PushNotificationHelper
  • 36. don’t re-invent the wheelControl ToolkitsPhoneyToolsCoding4Fun ToolkitSilverlight Toolkit for Windows PhoneWP7ContribMVVM ToolkitsMVVM LightCaliburn.MicroDatabasesSterlingSQLiteAgFx
  • 37. NuGet
  • 38. text inputTextBoxintegrates with the software keyboardSoftware keyboard supports input scopingKey InputScopes: EmailNameOrAddressTextUrlNumberTimeTelephoneNumberPasswordBox has a 1 second delayText Text Revolution: A Game that Improves Text Entry on Mobile Touchscreen Keyboards
  • 40. memory constraintsDo not use more than 90mb of RAMUse Coding4Fun Toolkit MemoryCounter+/- 30% reduction in working set
  • 41. Certification checklistNo network, no problem?<90MB?Theme aware?Handles exceptions?Back button works as expected?User consent dialogs & settings
  • 42. Monitor your applicationAdd a “Send Feedback” buttonStore crash data and ask user to email itAnalytics
  • 44. Don’t forget the Xbox Kinectshow-down after sessions this evening!
  • 45. DevDays 2011 SponsorsPLATINUM SPONSORwww.bbd.co.zaSILVER SPONSORwww.dvt.co.zaSILVER SPONSORwww.ctutraining.co.za
  • 47. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.