際際滷

際際滷Share a Scribd company logo
Designing and developing a Windows Phone 7 Silverlight Application End-to-End - Part 2
Katrien De Graeve
Developer Evangelist
Microsoft Belgium
Designing and Developing a
Windows Phone 7 Application in
Silverlight End-to-End  Part 2
SESSION CODE: WPH303
Part 1 Recap
Designing and developing a Windows Phone 7 Silverlight Application End-to-End - Part 2
5
CLOUD
SCREEN
Phone Emulator
Samples Documentation
Guides Community
Packaging and Verification Tools
Notifications
Location Identity Feeds
MapsSocial
App Deployment Registration
Validation
Certification
Publishing
Marketplace
MO and CC Billing
Business Intelligence
Update Management
Elements of the Windows Phone 7 Application Platform
Tools
Portal ServicesCloud Services
Sensors Media Data
Xbox LIVE Notifications
.NET Framework managed code sandbox
Location
Phone
Runtime  On Screen
6
Location
Location
services
+ Accuracy
- Power
- Speed
- Indoors- Accuracy
+ Power
+ Speed
- Wilderness
+/- Accuracy
+/- Power
+/- Speed
+/- Urban areas
GPS
7
Bing Maps
Use of Location Services
Bing Maps Silverlight Control
Based on desktop version
New events and event argument classes (MapDragEventArgs,
MapFlickEventArgs, MapPan, MapResolved, MapZoom)
Differences Phone and Desktop versions:
http://msdn.microsoft.com/en-us/library/ff955762.aspx
Adding location and loading
real data
9
Tips, Tricks and Lessons Learned
Accessing location consumes battery, store location
Tip: use Bing Maps Online Interactive SDK
http://www.microsoft.com/maps/isdk/silverlight/
Create your Bing Maps developer key
http://msdn.microsoft.com/en-us/library/ff428642.aspx
10
Choosers and Launchers
APIs for launching built-in applications
Choosers: always return a value (CameraPictureTask,
PhotoChooserTask
Launchers: launch an application without returning any
value (PhoneCallTask, etc)
11
List of choosers and launchers
Launchers
BingMapsTask
MarketplaceDetailTask
MarketplaceHubTask
MarketplaceReviewTask
MarketplaceSearchTask
MediaPlayerLauncher
PhoneCallTask
SaveEmailAddressTask
SavePhoneNumberTask
(contd)
SearchTask
EmailComposeTask
SMSComposeTask
WebBrowserTask
Choosers
CameraCaptureTask
PhoneNumberChooserTask
PhotoChooserTask
EmailAddressChooserTask
14
Application Lifecycle and Tombstoning
PhoneApplicationService
App events
Application_Launching
Application_Activated
Application_Deactivated
Application_Closing
http://msdn.microsoft.com/en-us/library/ff817008(VS.92).aspx
Adding CameraCaptureTask
Saving data
demo
16
Tips, Tricks and Lessons Learned
Application execution lifecycle and tombstoning
CameraCaptureTask and testing on device
BackgroundWorker
17
Push Notifications
Server-initiated communication
Enables key background scenarios
Preserves battery life and user experience
18
New photos online!
Seattle, WA: Sunny and 85 degrees
Notification Types
1
4
1
5
19
Push Notifications: Data Flow
Push client
Push
service
Your
service
Tile
App
Toast
Send push data to URI
Send push
data to client
Send URI
to server
Open push channelReturn URIData to App
Data to toast
Data to tile
Event
out.loud Push Notification
demo
21
Tips, Tricks and Lessons Learned
BackgroundWorker
OData Service: ChangeInterceptor
Notify User visually and with vibration when inside app
You are in charge
Using a Tile Schedule:
http://msdn.microsoft.com/en-us/library/ff769548(v=VS.92).aspx
Closing the loop
Application bar, back key
demo
23
Finetuning, not covered
Orientation support
Integration with authentication & membership
Integration with Twitter
Unit testing
Error handling 
...
24
Session Objectives and Takeaways
High level overview of an end-to-end App
Integrate most of concepts in one sample
Cloud services
MVVM
Design of Views: Controls, Pages and Navigation
Development of ViewModel/Model
Integration with Phone and use of Phone Frameworks
25
Resources
Get started, all tooling is free and available to all:
http://developer.windowsphone.com
Performance on Windows Phone 7  must read material:
http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/09/1
3/building-high-performance-silverlight-apps-on-windows-phone-7.aspx
Windows Phone 7 Jump Start training (12 hours training,
including labs and video):
http://blogs.msdn.com/b/mikeormond/archive/2010/08/19/windows-
phone-7-jumpstart-training-on-demand.aspx
26
Windows Phone 7: A New Kind of Phone
Mobility Smack Down
Related Content
Building Games for Windows Phone 7 with XNA
息 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

Designing and developing a Windows Phone 7 Silverlight Application End-to-End - Part 2

  • 2. Katrien De Graeve Developer Evangelist Microsoft Belgium Designing and Developing a Windows Phone 7 Application in Silverlight End-to-End Part 2 SESSION CODE: WPH303
  • 5. 5 CLOUD SCREEN Phone Emulator Samples Documentation Guides Community Packaging and Verification Tools Notifications Location Identity Feeds MapsSocial App Deployment Registration Validation Certification Publishing Marketplace MO and CC Billing Business Intelligence Update Management Elements of the Windows Phone 7 Application Platform Tools Portal ServicesCloud Services Sensors Media Data Xbox LIVE Notifications .NET Framework managed code sandbox Location Phone Runtime On Screen
  • 6. 6 Location Location services + Accuracy - Power - Speed - Indoors- Accuracy + Power + Speed - Wilderness +/- Accuracy +/- Power +/- Speed +/- Urban areas GPS
  • 7. 7 Bing Maps Use of Location Services Bing Maps Silverlight Control Based on desktop version New events and event argument classes (MapDragEventArgs, MapFlickEventArgs, MapPan, MapResolved, MapZoom) Differences Phone and Desktop versions: http://msdn.microsoft.com/en-us/library/ff955762.aspx
  • 8. Adding location and loading real data
  • 9. 9 Tips, Tricks and Lessons Learned Accessing location consumes battery, store location Tip: use Bing Maps Online Interactive SDK http://www.microsoft.com/maps/isdk/silverlight/ Create your Bing Maps developer key http://msdn.microsoft.com/en-us/library/ff428642.aspx
  • 10. 10 Choosers and Launchers APIs for launching built-in applications Choosers: always return a value (CameraPictureTask, PhotoChooserTask Launchers: launch an application without returning any value (PhoneCallTask, etc)
  • 11. 11 List of choosers and launchers Launchers BingMapsTask MarketplaceDetailTask MarketplaceHubTask MarketplaceReviewTask MarketplaceSearchTask MediaPlayerLauncher PhoneCallTask SaveEmailAddressTask SavePhoneNumberTask (contd) SearchTask EmailComposeTask SMSComposeTask WebBrowserTask Choosers CameraCaptureTask PhoneNumberChooserTask PhotoChooserTask EmailAddressChooserTask
  • 12. 14 Application Lifecycle and Tombstoning PhoneApplicationService App events Application_Launching Application_Activated Application_Deactivated Application_Closing http://msdn.microsoft.com/en-us/library/ff817008(VS.92).aspx
  • 14. 16 Tips, Tricks and Lessons Learned Application execution lifecycle and tombstoning CameraCaptureTask and testing on device BackgroundWorker
  • 15. 17 Push Notifications Server-initiated communication Enables key background scenarios Preserves battery life and user experience
  • 16. 18 New photos online! Seattle, WA: Sunny and 85 degrees Notification Types 1 4 1 5
  • 17. 19 Push Notifications: Data Flow Push client Push service Your service Tile App Toast Send push data to URI Send push data to client Send URI to server Open push channelReturn URIData to App Data to toast Data to tile Event
  • 19. 21 Tips, Tricks and Lessons Learned BackgroundWorker OData Service: ChangeInterceptor Notify User visually and with vibration when inside app You are in charge Using a Tile Schedule: http://msdn.microsoft.com/en-us/library/ff769548(v=VS.92).aspx
  • 20. Closing the loop Application bar, back key demo
  • 21. 23 Finetuning, not covered Orientation support Integration with authentication & membership Integration with Twitter Unit testing Error handling ...
  • 22. 24 Session Objectives and Takeaways High level overview of an end-to-end App Integrate most of concepts in one sample Cloud services MVVM Design of Views: Controls, Pages and Navigation Development of ViewModel/Model Integration with Phone and use of Phone Frameworks
  • 23. 25 Resources Get started, all tooling is free and available to all: http://developer.windowsphone.com Performance on Windows Phone 7 must read material: http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/09/1 3/building-high-performance-silverlight-apps-on-windows-phone-7.aspx Windows Phone 7 Jump Start training (12 hours training, including labs and video): http://blogs.msdn.com/b/mikeormond/archive/2010/08/19/windows- phone-7-jumpstart-training-on-demand.aspx
  • 24. 26 Windows Phone 7: A New Kind of Phone Mobility Smack Down Related Content Building Games for Windows Phone 7 with XNA
  • 25. 息 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.